Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).

Android studio打包出现:

Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).

Searched in the following locations:

    https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar


网上好多方法,有的说加google(),有的说加阿里的maven镜像...

试了发现这些方法都不行,最后发现在app的build.gradle中的jcenter()和google()的顺序写反了,

应该是google()在前边jcenter()在后边

buildscript {

    repositories {

        google()

        jcenter()

    }

}

你可能感兴趣的:(Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).)