Gustavo Inácio
Gustavo Inácio

Reputation: 73

Could not resolve all files for configuration ':react-native-vector-icons:classpath'

I'm facing the following error when trying to run

react-native run android

The console acuses:

  • What went wrong:

A problem occurred configuring project ':react-native-vector-icons'.

> Could not resolve all files for configuration ':react-native-vector-icons:classpath'.

> Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.

Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml https://jcenter.bintray.com/com/android/tools/build/gradle/

Required by: project :react-native-vector-icons

Upvotes: 1

Views: 1931

Answers (3)

Rajat Gupta
Rajat Gupta

Reputation: 1954

  1. Try updating react-native-vector-icons.
  2. If you don't want to update change classpath version to 2.2.3 instead of 2.3.+

Upvotes: 0

shizhen
shizhen

Reputation: 12583

Check it here: https://stackoverflow.com/a/53734791/8034839

Try to add this to your build.gradle file.

subprojects {
    if (project.name.contains('react-native-vector-icons')) {
        buildscript {
            repositories {
                jcenter()
                maven { url "https://dl.bintray.com/android/android-tools/"  }
            }
        }
    }
}

Upvotes: 1

Gustavo Inácio
Gustavo Inácio

Reputation: 73

Changing the version of react-native-vector-icons did the trick

I actually found the answer in this post: react native vector icons

Made it work by making a change in the package.json file.

Changed the line:

"react-native-vector-icons": "^5.0.0",

To:

"react-native-vector-icons": "^6.1.0",

Upvotes: 2

Related Questions