React Native: Could not find support-vector-drawable.aar

Viewed 2527

I run react-native 0.57.1 app, then I got the following lines.

FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
/> Could not find support-vector-drawable.aar (com.android.support:support-vector-drawable:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-vector-drawable/27.1.1/support-vector-drawable-27.1.1.aar
/> Could not find livedata-core.aar (android.arch.lifecycle:livedata-core:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/lifecycle/livedata-core/1.1.0/livedata-core-1.1.0.aar
/> Could not find viewmodel.aar (android.arch.lifecycle:viewmodel:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/lifecycle/viewmodel/1.1.0/viewmodel-1.1.0.aar
/> Could not find runtime.aar (android.arch.core:runtime:1.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/android/arch/core/runtime/1.1.0/runtime-1.1.0.aar
3 Answers

Below worked for me, Try to put google() as the first repo as below. Don't put it under jcenter() and mavenCentral() for your existing Android Studio projects. And Just move google() from bottom to top in allprojects > repositories in build.gradle of module.

Originally, here is the answer

Open your android application using the android studio. Then try to build it. It will give u a direct information which causes to fail. It will suggest you to fixes as well. Then try to run it through that.

Most probably version complicit is there. All com.android.support libraries must use the exact same version. Check versions in your android Gradle files. This All com.android.support libraries must use the exact same version specification will help u to get an idea about it.

Related