When I run a project I get the error:
Could not find com.android.tools.build:gradle:4.1.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom
Required by:
project :
Add google Maven repository and sync project
Open File
my gradle file looks like this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
What can I do now?
Best Answer
The problem here is that the android tools plugin you want to use has moved. Old distributions are in jcenter, but new ones are at "https://maven.google.com"
Update your repositories to include "https://maven.google.com"