From 0a67f8c94738cb2b8712e50a1310b3dd8bf0302c Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 14 Oct 2018 20:44:05 +0100 Subject: [PATCH 1/2] Revert "Android: Updated project to build on macOS" This reverts commit b547f9aa134bd953ca220a197aff9beb867a2f9d. --- ReactNativeClient/android/build.gradle | 4 ++-- .../android/gradle/wrapper/gradle-wrapper.properties | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ReactNativeClient/android/build.gradle b/ReactNativeClient/android/build.gradle index 1b1912bddb..affc32dc34 100644 --- a/ReactNativeClient/android/build.gradle +++ b/ReactNativeClient/android/build.gradle @@ -6,14 +6,14 @@ buildscript { minSdkVersion = 16 compileSdkVersion = 27 targetSdkVersion = 26 - supportLibVersion = "26.1.0" + supportLibVersion = "27.1.1" } repositories { jcenter() google() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.1.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/ReactNativeClient/android/gradle/wrapper/gradle-wrapper.properties b/ReactNativeClient/android/gradle/wrapper/gradle-wrapper.properties index 3c37ad9c4d..b6517bb1d1 100644 --- a/ReactNativeClient/android/gradle/wrapper/gradle-wrapper.properties +++ b/ReactNativeClient/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sat Oct 13 00:16:49 BST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip From fa1b471ea48cbc312b02602b6a21ed57177160b9 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 14 Oct 2018 21:41:29 +0100 Subject: [PATCH 2/2] Android: Tryinc to fix release builkd --- ReactNativeClient/android/app/build.gradle | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ReactNativeClient/android/app/build.gradle b/ReactNativeClient/android/app/build.gradle index d690a499f7..60f06a8933 100644 --- a/ReactNativeClient/android/app/build.gradle +++ b/ReactNativeClient/android/app/build.gradle @@ -90,8 +90,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2097325 - versionName "1.0.147" + versionCode 2097406 + versionName "1.0.170" ndk { abiFilters "armeabi-v7a", "x86" } @@ -154,6 +154,22 @@ dependencies { compile project(':react-native-image-resizer') compile project(':react-native-share-extension') compile "com.facebook.react:react-native:+" + + // To fix this error: + // + // Fatal error + // { Error: Command failed: ./gradlew assembleRelease -PbuildDir=build --console plain + + // FAILURE: Build failed with an exception. + + // * What went wrong: + // Execution failed for task ':app:preReleaseBuild'. + // > Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution + // + // https://github.com/react-native-community/react-native-camera/issues/1532#issuecomment-386434771 + compile ("com.android.support:support-v4:26.0.1") { + force = true //<-- force dependency resolution to 26.0.1 in my case + } } // Run this once to be able to run the application with BUCK