react-native-email-link
react-native-email-link copied to clipboard
[Android] Build "Failed to create MD5 hash for file content" with RN 0.66 / Gradle plugin 4.2.2
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Looks like there is an issue with latest RN version (it was fixed when I updated gradle plugin version to be the same as in RN itself)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':react-native-email-link'.
> Failed to create MD5 hash for file content.
I used patch-package to patch [email protected], here is the diff that solved my problem:
diff --git a/node_modules/react-native-email-link/android/build.gradle b/node_modules/react-native-email-link/android/build.gradle
index ebf3948..10bd447 100755
--- a/node_modules/react-native-email-link/android/build.gradle
+++ b/node_modules/react-native-email-link/android/build.gradle
@@ -19,11 +19,11 @@ def safeExtGet(prop, fallback) {
buildscript {
ext {
- minSdkVersion = 16
- compileSdkVersion = 29
- targetSdkVersion = 29
- gradlePluginVersion = "3.5.1"
+ minSdkVersion = rootProject.ext.has("minSdkVersion") ? rootProject.ext.get("minSdkVersion") : 16
+ compileSdkVersion = rootProject.ext.has("compileSdkVersion") ? rootProject.ext.get("compileSdkVersion") : 29
+ targetSdkVersion = rootProject.ext.has("targetSdkVersion") ? rootProject.ext.get("targetSdkVersion") : 29
reactNativeVersion = "+" // The react native versioning on jcenter is messed up: https://github.com/facebook/react-native/issues/13094
+ gradlePluginVersion = rootProject.ext.has("gradlePluginVersion") ? rootProject.ext.get("gradlePluginVersion") : "3.5.1"
}
repositories {
also i added gradlePluginVersion variable to the root project build.gradle ext
This issue body was partially generated by patch-package.
Hi @ponomarevv, thanks for that! Would you be able to open a PR with these changes? Happy to accept them!