Today, I upgraded Android Studio and found that the code can run, but there is an error in the release package. The error is as follows
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
The error provides us with the above two kinds of repair way of version
a: repair
Lint to check out the problem 2: in the build of the module. The gradle add the following code, so you can ignore these problems, the normal packaging
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
The second method is convenient, but it’s not recommended to ignore the problem, according to the website
In addition to testing the Android application to make sure it meets its functional requirements, you must also make sure that the code has no structural problems. Disorganized code affects the reliability and efficiency of an Android application and makes it harder to maintain the code.
Lint check problems is to prevent the above problems, so the way we use the following method to solve this problem
in the error above only hint Lint has a problem But didn’t tell me about any problem. Can use the android studio to see these errors
in the menu bar
can complete inspection can also specify folder check, click OK to wait for a while can see the test result, and then the error of the test results to solve can normal packing up
Reference links
https://developer.android.google.cn/studio/write/lint?hl=zh-CN
Read More:
- Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
- appear Error:java : javacTask: source release 1.7 requires target release 1.7
- javac Task Error source release 1.7 requires target release
- Java in idea: warning: source release 11 needs to be resolved by target release 11
- Android Studio | Failed to find target with hash string ‘android-26’ in: D:\Android\sdk
- When Maven hits the jar package, an error is reported when executing install, and the symbol cannot be found in a line
- Android studio reported an error, Error:SSL peer shut down incorrectly
- An error is reported after Android studio creates a new virtual machine. Emulator: emulator: error: unknown AVD name
- [actual record of Android stepping on the pit] Android studio reports an error invalid gradle JDK configuration found after importing the project
- Solutions to errors in virtual machine running in Android studio
- Waiting for another pilot command to release the startup lock
- Windows can’t delete the file, indicating that it is in use. (release of document occupation)
- Android Error | Failed to find target with hash string ”android-23′ in…
- Using Mocha to test can not find module ‘. /build/release/scrypt’ (Fixed)
- Android studio compilation error: style attribute ‘@ android:attr/windowEnterAnimation ‘not found the ultimate solution
- Maven invalid source release 11
- Android Studio error “Manifest merger failed with multiple errors, see logs” solution
- Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK
- 26、Error:No resource identifier found for attribute ’roundIcon’ in package ‘android’
- Android studio change package name