S
S
Space Around2021-02-10 16:58:24
gradle
Space Around, 2021-02-10 16:58:24

Could not find com.android.tools.build:gradle:4.1.1.?

I can't build applications in react native.
What have already tried:

  1. Sync Project with Gradle Files but throws the error below
  2. File -> Invalidate Caches/ Restart
  3. Cleared cache from $HOME/.gradle
  4. Deleted $HOME/.gradle folder
  5. Changed the version of com.android.tools. build:gradle to 2.3.0 because it's the latest version from this list ( https://repo.jfrog.org/artifactory/libs-release-bi... ) but when I npx react-native init projectNameuse Android Plugin version 4.1.2 is used , I do not understand why this happens, because there is no such version in this list. If there is an understanding about how Gradle is different, Android Gradle Plugin, Gradle Wrapper, familiar with the documentation , also tried to use the latest version of Gradle v. 6.8.2 and Android Gradle Plugin v. 4.1.2, it also didn't help to make build.
  6. Changed distributionUrl in projectName/android/gradle/wrapper/gradle-wrapper.properties
  7. Changed use Gradle from to Specified location and path C:/Gradle/gradle-6.8.2 in File->Settings->Build, Execution, Deployment->Gradle, it also didn't help and left by default

I tried to google, there are exactly the same questions on stackoverflow and on github, but the solutions given did not help.

Build output:
Could not find com.android.tools.build:gradle:4.1.1.
Searched in the following locations:
  - https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
    project :react-native-settings
Add google Maven repository and sync project
Open File


Now I use:

  • Gradlev. 6.5
  • Android Gradle Pluginv. 4.1.2
  • gradle-wrapper 6.5-all
  • Android Studios 4.1.2
  • Android SDK Platform: Android 10, 9, 8.1, 8.0, 7.1.1, 7.0

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question