今天修復完代碼做個內測版給同事用一下,打包後出現致命錯誤:
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
}
}
...
大概意思就是說Lint 發現一個致命錯誤,你可以選擇它或者在build中添加以下代碼進行忽略,雖然你可以直接在build.grade中的android{ }中添加以下代碼解決此問題:
lintOptions {
checkReleaseBuilds false
abortOnError false
}
但如果運行時遇到這個問題就會導致崩潰,所以還是看一下有啥問題好了,具體問題AS已經給我們生成到了 ./app/build/reports/ 文件夾下,裏面有個html打開後就可以看到問題所在了。
還是挺清楚的描述了哪裏有問題,我這裏是name寫錯導致的,修改後即可打包成功。
如果這篇文章對你有幫助的話,歡迎點贊,評論。