When I sign my Android app it gives this error:
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
And when I add this to my app:
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
}
then there is no error, but APK won't install on my phone.
question from:
https://stackoverflow.com/questions/65868280/how-to-fix-execution-failed-for-task-applintvitalrelease 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…