Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 982
Lintang Wisesa Avatar asked Oct 24 '18 05:10

Lintang Wisesa


1 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

like image 89
SaraVanaN Avatar answered Nov 10 '22 11:11

SaraVanaN