Reputation: 243
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
Upvotes: 16
Views: 21328
Reputation: 25
First Generate : cacerts file
$ keytool -importkeystore -srckeystore {your-home-directory}\.AndroidStudio3.0\system\tasks\cacerts -destkeystore .\cacerts -v
then add this code in gradle.properties
systemProp.javax.net.ssl.trustStore=C:\\ProgramFiles\\Java\\jdk1.8.0_171\\jre\\lib\\security\\cacerts
systemProp.javax.net.ssl.trustStorePassword=changeit
Upvotes: -3
Reputation: 880
make sure the google() repo for repositories is in both your buildscript and allprojects sections.
Upvotes: 6
Reputation: 10152
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.
Upvotes: 28
Reputation: 856
For those who experience the same problem, try adding this to App Builde.gradle :
android {
//the rest of the code above
lintOptions {
disable 'MissingTranslation'
}
}
I had the same problem, and this, for whatever reason, worked for me.
Upvotes: -1