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

6

11

hi i have a probleme with testing my react native app, this morning it works fine , but when i test it now i get this error:

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 could anyone helps me and thanks

Reel answered 10/12, 2018 at 19:44 Comment(0)
S
0

Node is not good at figuring out when there are newer versions of an already used package. In this case, the version of react-native-vector-icons being referenced in the package.json file uses an older version of gradle.

To fix this, first try:

npm install react-native-vector-icons -save

If this doesn't work, which didn't in my case, go into your package.json file and change the package to the latest version yourself.

Get the latest version from the react-native-vector-icons website (right now it's 6.1.0) and change the line in the package.json, making it:

"dependencies": {
    ...

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

    ...
 }
Strobel answered 11/12, 2018 at 16:6 Comment(0)
A
2

Just install the newer version of the package

yarn add react-native-vector-icons

Arthropod answered 11/12, 2018 at 9:0 Comment(2)
I got exactly the same error today and fixed by installation of new version.Birkle
@GammaKo yeah that happened with me too.Arthropod
S
2

Today I got the same problem with you! And then I try to change the versions, it is fixed now. just edit your package.json like this.

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

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

Syncopation answered 11/12, 2018 at 12:45 Comment(0)
P
2

Hi try this in your android/build.gradle after the allprojects section

    subprojects {
    if (project.name.contains('react-native-vector-icons')) {
        buildscript {
            repositories {
                maven {
                    url "https://dl.bintray.com/android/android-tools/"
                }
                jcenter()
            }
        }
    }
}
Polychromy answered 11/12, 2018 at 13:8 Comment(0)
I
0

Older versions of react-native-vector-icons appear to be referencing a version of the Android Gradle Plugin that recently stopped being available.

Updating your version should fix the problem. You can do this per the react-native-vector-icons installation instructions with:

npm install react-native-vector-icons --save

or if you use yarn:

yarn add react-native-vector-icons
Ironing answered 11/12, 2018 at 0:29 Comment(0)
Z
0

Please share your current version of following

  1. react-native-vector-icons
  2. Current gradle version

This issue is due to that currently your app is being build with different gradle version and the react-native-vector-icons requires the gradle 2.3.+

Installing old version of react-native-vector-icons may fix this issue.

Or update your current gradle version by following this => How to update gradle in android studio?

Ziguard answered 11/12, 2018 at 7:55 Comment(0)
S
0

Node is not good at figuring out when there are newer versions of an already used package. In this case, the version of react-native-vector-icons being referenced in the package.json file uses an older version of gradle.

To fix this, first try:

npm install react-native-vector-icons -save

If this doesn't work, which didn't in my case, go into your package.json file and change the package to the latest version yourself.

Get the latest version from the react-native-vector-icons website (right now it's 6.1.0) and change the line in the package.json, making it:

"dependencies": {
    ...

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

    ...
 }
Strobel answered 11/12, 2018 at 16:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.