无法在android studio 3.0中构建发布apk

时间:2017-12-30 01:56:11

标签: android-studio

错误:任务':app:lintVitalRelease'执行失败。

  

无法解析配置':app:lintClassPath'的所有文件。   找不到com.android.tools.lint:lint-gradle:26.1.0-alpha04。        在以下位置搜索:            文件:/ C:/Users/preet/AppData/Local/Android/sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04。 POM            文件:/ C:/Users/preet/AppData/Local/Android/sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04。罐            文件:/ C:/Users/preet/AppData/Local/Android/sdk/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0- alpha04.pom            文件:/ C:/Users/preet/AppData/Local/Android/sdk/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0- alpha04.jar            文件:/ C:/Users/preet/AppData/Local/Android/sdk/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0- alpha04.pom            文件:/ C:/Users/preet/AppData/Local/Android/sdk/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0- alpha04.jar            file:/ C:/ Program Files / Android / Android Studio / gradle / m2repository / com / android / tools / lint / lint-gradle / 26.1.0-alpha04 / lint-gradle-26.1.0-alpha04.pom            file:/ C:/ Program Files / Android / Android Studio / gradle / m2repository / com / android / tools / lint / lint-gradle / 26.1.0-alpha04 / lint-gradle-26.1.0-alpha04.jar            https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04.pom            https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04.jar            https://jitpack.io/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04.pom            https://jitpack.io/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04.jar            https://repo1.maven.org/maven2/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04.pom            https://repo1.maven.org/maven2/com/android/tools/lint/lint-gradle/26.1.0-alpha04/lint-gradle-26.1.0-alpha04.jar        要求:            项目:app

1 个答案:

答案 0 :(得分:1)

检查 build.gradle 文件,看起来错过了一些必需的存储库。

例如:

allprojects {
    repositories {
        jcenter()
        google()
    }
}