我是靠谱客的博主 怕孤独棉花糖,这篇文章主要介绍Lint found fatal errors while assembling a release target.,现在分享给大家,希望可以做个参考。
错误信息:
调试的时候,都没有问题,但是在打包的时候,报出下面的错误
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14Lint 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 checkReleaseBuilds 的检查,虽然这样可以解决问题,但是没有解决根本问题。也就是说隐患依旧会存在
lint 是代码检查,可以优化代码,发现一些潜在的bug,所以尽量不要关闭
关于lint的使用,可以查看 Android 性能优化:使用 Lint 优化代码、去除多余资源
解决方法:
这个错误报告会生成在 [app module]/build/reports/lint-results-yourBuildName-fatal.html 打开这个网页,可以看到详细的错误信息,修改起来就简单了。
下面贴上我这次遇到的具体情况,图中写的很清楚了,就不在叙述了。找到原因后,就可以从根本上解决
参考:
Error when generate signed apk
最后
以上就是怕孤独棉花糖最近收集整理的关于Lint found fatal errors while assembling a release target.的全部内容,更多相关Lint内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复