簡體   English   中英

如何修復任務':app:lintVitalRelease'的執行失敗

[英]how to fix Execution failed for task ':app:lintVitalRelease'

當我簽署我的 Android 應用程序時,它給出了這個錯誤:

Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
   > Could not find lint-gradle-27.1.0.jar (com.android.tools.lint:lint-gradle:27.1.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/27.1.0/lint-gradle-27.1.0.jar
   > Could not find lint-27.1.0.jar (com.android.tools.lint:lint:27.1.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/27.1.0/lint-27.1.0.jar
   > Could not find lint-checks-27.1.0.jar (com.android.tools.lint:lint-checks:27.1.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/27.1.0/lint-checks-27.1.0.jar
   > Could not find lint-api-27.1.0.jar (com.android.tools.lint:lint-api:27.1.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/27.1.0/lint-api-27.1.0.jar
   > Could not find intellij-core-27.1.0.jar (com.android.tools.external.com-intellij:intellij-core:27.1.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/27.1.0/intellij-core-27.1.0.jar
   
     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

當我將它添加到我的應用程序時:

lintOptions {
    quiet true
    // Whether lint should set the exit code of the process if errors are found
    abortOnError false
    // Returns whether lint will only check for errors (ignoring warnings)
    ignoreWarnings true
    // Returns whether lint should check for fatal errors during release builds. Default is true.
    // If issues with severity "fatal" are found, the release build is aborted.
    checkReleaseBuilds false
}

那么沒有錯誤,但APK不會安裝在我的手機上。

我有你的問題:

  • 退出Android工作室
  • 刪除 gradle 緩存文件夾位於C:\Users\{USER}\.gradle\caches
  • 運行 Android Studio 並重建

我也有這個問題:我剛剛刪除了這些文件:

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 並再次執行。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM