Could not find com.android.tools.lint:lint-gradle Android Studio 3 Could not find com.android.tools.lint:lint-gradle Android Studio 3 android android

Could not find com.android.tools.lint:lint-gradle Android Studio 3


If you're running lint on a project that you created using an older version of Android Studio, you may encounter this error.

To resolve this issue, for each project that you would like to run lint on, include Google's Maven repository in the top-level build.gradle file, as shown below:

allprojects {    repositories {        // The order in which you list these repositories matter.        google()        jcenter()    }}


It looks to me like you're missing the google() repository in order to fetch the dependency.

Here's the link to the pom file that you're looking for: https://dl.google.com/dl/android/maven2/com/android/tools/testutils/26.1.0-alpha01/testutils-26.1.0-alpha01.pom


I solved this by adding the https://mvnrepository.com/artifact/com.android.tools.lint/lint-gradle-apirepo to build.gradle:

repositories {    maven {        url 'https://maven.google.com/'        name 'Google'    }    jcenter()    maven {        url 'https://mvnrepository.com/artifact/com.android.tools.lint/lint-gradle-api'    }}