错误信息:
AndroidStudio 导入项目时:
Error: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
解决办法:
一,打开build.gradle(Project:)
二,在buildscript的repositories中如果有google()注释掉
buildscript {
repositories {
// google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
三,clear一下项目,从新编译项目就好了;或者点击Sync Now同步一下就好
注:
1,网上还有博客说在repositories添加google(),而且要放在jcenter()的前面;关闭项目再重新打开就好了;
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}