My project was working perfectly but it stops building after upgrading to RN 0.62.0 from RN 0.59.5 (debug build is working fine, it happens only for assembleRelease)
I did a bit of google search and came across using macthingFallback, but that doesn't worked too.
missingDimensionStrategy can be a solution, but adding it for every library used can't be optimised option.
Please help, if anyone-else had came across same or similar issue.
my android/app/build.gradle have
Two items in signingConfigs i.e. prod and stage that contains infoabout .keystore
Four items in productFlavors (i.e. dev, beta, prod,qa)
- Three items in buildTypes i.e.
debug { applicationIdSuffix = ".dev" }
release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" productFlavors.beta.signingConfig signingConfigs.stage productFlavors.prod.signingConfig signingConfigs.prod productFlavors.qa.signingConfig signingConfigs.stage matchingFallbacks = ['release']}packagingOptions { pickFirst "lib/armeabi-v7a/libc++_shared.so" pickFirst "lib/arm64-v8a/libc++_shared.so" pickFirst "lib/x86/libc++_shared.so" pickFirst "lib/x86_64/libc++_shared.so"}
android/build.gradle have
dependencies{ classpath('com.android.tools.build:gradle:3.6.3')}repositories { google() jcenter() maven { url 'https://maven.fabric.io/public' } }allprojects { repositories { mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } maven { url "https://www.jitpack.io" } }}
my gradle-wrapper.properties have
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
my gradle.properties
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8android.useAndroidX=trueandroid.enableJetifier=trueFLIPPER_VERSION=0.33.1
settings.gradle have
rootProject.name = 'APPNAME'include ':react-native-config'project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)include ':react-native-sound'project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')include ':app', ':react-native-code-push'project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
Error logs after running ./gradlew assembleRelease (giving error only for release build)