androidreact-nativevector-icons

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


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


Solution

  • 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",
    
        ...
     }