Issue
I faced the problem, more correct in gradle, when I enter the command - npx react-native run-android into the console - it gives me the following error :
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'Da'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find com.android.tools.build:gradle:6.4.1.
Searched in the following locations> https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.4.1/gradle-6.4.1.pom -https://jcenter.bintray.com/com/android/tools/build/gradle/6.4.1/gradle-6.4.1.pom
Initially - the problem was incompatibility between gradle and android versions, but after i changed version of gradle and terminal automatically download new version into directory, first error disappeared, but i got another (current problem). I had try some advice before asking question in StackOverFlow, but they didn't work. Here some characteristics : React-Native Doctor image
Gradle code : gradle.properties , gradle-wrapper.properties
Gradle Directory : Here
Path variables :Here
I appreciate all help (I think, that issue is in PATH, but not sure). By the way - does anyone know, how to add pictures without link?
Solution
You are confusing gradle with the gradle plugin.
The gradle plugin 6.4.1
doesn't exist.
Use the latest stable version:
classpath 'com.android.tools.build:gradle:4.2.2'
Check also the compatibility with the gradle version:
Plugin version Required Gradle version
4.0.0+ 6.1.1+
4.1.0+ 6.5+
4.2.0+ 6.7.1+
Answered By - Gabriele Mariotti
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.