While generating APK, It's showing build failed, this is the error message :
Could not find com.android.tools.lint:lint-gradle:26.1.1.
Searched in the following locations:
file:/C:/Users/Abde/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.pom
file:/C:/Users/Abde/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.jar
file:/C:/Users/Abde/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.pom
file:/C:/Users/Abde/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.jar
file:/C:/Users/Abde/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.pom
file:/C:/Users/Abde/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.jar
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.pom
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.1/lint-gradle-26.1.1.jar
Required by:
project :app
Help me ! thank you
If you're running lint on a project that you created using an older version of Android Studio, you may encounter this error.
Your top-level project build.gradle ought to have the google()
repository in order to fetch this dependency like this:
allprojects {
repositories {
// The order in which you list these repositories matter.
google()
jcenter()
}
}
Note that: The google()
repo is a shortcut to looks in Google's Maven repository for dependencies. It was introduced with Gradle v.4.0 (required Android Studio 3.x and Gradle plugin 3.x).
In any case (Android Studio 2.x, gradle plugin 2.x.x, or gradle v3.x) you can use the same maven repo using maven { url 'https://maven.google.com' }
. It is the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With