我在一个新的电脑上打开之前的项目构建之后出现了这个问题:
Could not resolve all files for configuration 'classpath'. 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
百度找了好多都没解决问题,最终在stakoverflow找到了解决办法:
将下面的内容
maven {
url 'https://dl.google.com/dl/android/maven2'
}
放到这个的上面
jcenter()
如下,在项目的build.gradle里面
buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}