react-native: Could not find support-vector-drawable.aar

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

Any suggestions? Thx in advance

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 17
  • Comments: 25

Commits related to this issue

Most upvoted comments

Moving google() to the first element in the list helped me

allprojects {
  repositories {
      google() // now here
      mavenLocal()
      jcenter()
      maven {
          // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
      }
      // google() // was here
  }
}

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

If you’d like to propose a change or discuss a feature request, there is a repository dedicated to Discussions and Proposals you may use for this purpose.

it works in ionic 3 too ! thanks

allprojects { repositories { google() // now here mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url “$rootDir/…/node_modules/react-native/android” } // google() // was here } }

still same error what to do?

In my case, for gradle:2.2.3

allprojects {
    repositories {
        maven { url 'https://maven.google.com' }  // now here
        mavenLocal()
        jcenter()
        maven { url "$rootDir/../node_modules/react-native/android" }
        maven { url 'https://maven.google.com' }  // was here
    }
}

Any solution to fix this permanently?