Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 924
Alaa Mokrani Avatar asked Dec 10 '18 19:12

Alaa Mokrani


People also ask

What version of Android Studio is compatible with Gradle?

Studio compatibility with Android Gradle plugin (AGP) Android Studio 4.2 can open projects that use AGP 3.1 and higher provided that AGP is running Gradle 4.8.1 and higher. For more information about Gradle compatibility, see Update Gradle. Optimizing Gradle builds for JDK 11

Is Android Gradle plugin compatible with Kotlin multiplatform plugin?

Android Gradle Plugin 7.0.0 is compatible with Kotlin Multiplatform plugin 1.5.0 and higher. Projects that use the Kotlin Multiplatform support need to update to Kotlin 1.5.0 to use Android Gradle Plugin 7.0.0.

Why did my compile Classpath change for the Android Gradle plugin?

If you are compiling against the Android Gradle plugin, your compile classpath may change. Because AGP now uses api/implementation configurations internally, some artifacts may be removed from your compile classpath. If you depend on an AGP dependency at compile-time, be sure to add it as an explicit dependency.

Is JDK 11 required to run Android Gradle?

When using Android Gradle plugin 7.0 to build your app, JDK 11 is now required to run Gradle. Android Studio Arctic Fox bundles JDK 11 and configures Gradle to use it by default, which means that most Android Studio users do not need to make any configuration changes to their projects.


3 Answers

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()
            }
        }
    }
}
like image 138
Garvin Chinhimba Avatar answered Oct 13 '22 06:10

Garvin Chinhimba


Just install the newer version of the package

yarn add react-native-vector-icons

like image 22
Mohamed Ben Hartouz Avatar answered Oct 13 '22 05:10

Mohamed Ben Hartouz


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",

like image 37
matt Avatar answered Oct 13 '22 04:10

matt