【问题标题】:Android:Execution failed for task ':app:lintVitalRelease'Android:任务':app:lintVitalRelease'的执行失败
【发布时间】:2021-04-28 20:31:36
【问题描述】:

我对 android studio 有一个大问题,没有一个答案对我有帮助。它发生在我想获取 APK 文件时。这是错误:

Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
   > Could not find lint-gradle-27.1.2.jar (com.android.tools.lint:lint-gradle:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/27.1.2/lint-gradle-27.1.2.jar
   > Could not find lint-27.1.2.jar (com.android.tools.lint:lint:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/27.1.2/lint-27.1.2.jar
   > Could not find lint-checks-27.1.2.jar (com.android.tools.lint:lint-checks:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/27.1.2/lint-checks-27.1.2.jar
   > Could not find lint-api-27.1.2.jar (com.android.tools.lint:lint-api:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/27.1.2/lint-api-27.1.2.jar
   > Could not find intellij-core-27.1.2.jar (com.android.tools.external.com-intellij:intellij-core:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/27.1.2/intellij-core-27.1.2.jar
   > Could not find kotlin-compiler-27.1.2.jar (com.android.tools.external.com-intellij:kotlin-compiler:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/27.1.2/kotlin-compiler-27.1.2.jar
   > Could not find uast-27.1.2.jar (com.android.tools.external.org-jetbrains:uast:27.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/27.1.2/uast-27.1.2.jar
   > Could not find aapt2-proto-4.1.0-alpha01-6193524.jar (com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/4.1.0-alpha01-6193524/aapt2-proto-4.1.0-alpha01-6193524.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html


如果可以,请帮助我。我真的需要它。谢谢

【问题讨论】:

  • 请同时发布导致错误的代码,以便我们调试并找到潜在的解决方案。

标签: java android gradle


【解决方案1】:

我修好了!我刚刚删除了这些文件:

project_folder/.gradle
project_folder/.idea
project_folder/.gradle
project_folder/build
project_folder/app/build
project_folder/app/release
C:\\users\Your_Name\.gradle\caches

然后打开 Android Studio 并再次执行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-24
    • 2018-08-23
    • 2019-11-06
    • 2015-08-27
    • 2015-07-16
    • 2023-03-23
    • 1970-01-01
    相关资源
    最近更新 更多