React Native - Run Android - Could Not Find Common.jar (android.arch.core:common:1.0.0)
Solution 1:
I found this solution and works for me:
add maven { url "https://maven.google.com" }
in line 18 in file android/build.gradle
Solution 2:
If you are using jcenter()
and maven {url "https://maven.google.com"}
make sure that maven {url "https://maven.google.com"}
is written first (upper in code).
android.arch.core:common:1.0.0
exists in jcenter()
, but doesn't have .jar
file there and thats why build fails. Using Google Maven first fixes this problem, because .jar exist there.
allprojects {
repositories {
maven { url 'https://maven.google.com' } // <--- This needs to be before jcenter().
jcenter()
}
}
Solution 3:
In my case, it was a network issue with my Wifi (proxy...). Try to switch network with mobile data for example.
Solution 4:
I updated my root projects build gradle version and all the support libraries to latest version and its working now, you can check it go through, build.gradle(root project) -> buildscript -> dependencies-> classpath->
classpath 'com.android.tools.build:gradle:3.your_latest_version'
also make sure your compileSdkVersion and buildToolsVersion are latest
and once check version of distributionUrl also from gradle-wrapper.properties file
Post a Comment for "React Native - Run Android - Could Not Find Common.jar (android.arch.core:common:1.0.0)"