Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29452

(React-Native 0.62.0) Getting Unable to find a matching variant of project :react-native-community_async-storage (same for other libs too)

$
0
0

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

  1. Two items in signingConfigs i.e. prod and stage that contains infoabout .keystore

  2. Four items in productFlavors (i.e. dev, beta, prod,qa)

  3. 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)


Viewing all articles
Browse latest Browse all 29452

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>