TypechoJoeTheme

香草物语

统计
登录
用户名
密码
/
注册
用户名
邮箱
输入密码
确认密码

Lint found errors in the project; aborting build导致打包停止错误解决

Laughing博主
2020-12-13
/
0 评论
/
2,473 阅读
/
85 个字
/
百度已收录
12/13
本文最后更新于2024年03月18日,已超过184天没有更新。如果文章内容或图片资源失效,请留言反馈,我会及时处理,谢谢!

今天在打包时的时候出现了这个错导致打包不成功,具体原因可以从报错日志中看到是因为studio检测到了lint错误,从而停止了打包。
解决办法是在app下的build.gradle 文件的android节点下添加lintOptions{ abortOnError false }即可,即在检测到lint错误时还接续进行打包。

7:00:55 :app:lint FAILED
17:00:55 
17:00:55 FAILURE: Build failed with an exception.
17:00:55 
17:00:55 * What went wrong:
17:00:55 Execution failed for task ':app:lint'.
17:00:55 > Lint found errors in the project; aborting build.
17:00:55   
17:00:55   Fix the issues identified by lint, or add the following to your build script to proceed with errors:
17:00:55   ...
17:00:55   android {
17:00:55       lintOptions {
17:00:55           abortOnError false
17:00:55       }
17:00:55   }
17:00:55   ...
17:00:55   
17:00:55   The first 3 errors (out of 6) were:
17:00:55   /root/.gradle/caches/modules-2/files-2.1/com.alibaba/fastjson/1.2.35/d0b54f814af4652f0893d560d6a785917abdeae1/fastjson-1.2.35.jar: Error: Invalid package reference in library; not included in Android: java.awt. Referenced from com.alibaba.fastjson.serializer.AwtCodec. [InvalidPackage]
17:00:55   /root/.gradle/caches/modules-2/files-2.1/com.alibaba/fastjson/1.2.35/d0b54f814af4652f0893d560d6a785917abdeae1/fastjson-1.2.35.jar: Error: Invalid package reference in library; not included in Android: javax.servlet.http. Referenced from com.alibaba.fastjson.support.spring.FastJsonJsonView. [InvalidPackage]
17:00:55   /root/.gradle/caches/modules-2/files-2.1/com.alibaba/fastjson/1.2.35/d0b54f814af4652f0893d560d6a785917abdeae1/fastjson-1.2.35.jar: Error: Invalid package reference in library; not included in Android: javax.servlet. Referenced from com.alibaba.fastjson.support.spring.FastJsonJsonView. [InvalidPackage]
Android Studio
朗读
赞(3)
赞赏
感谢您的支持,我会继续努力哒!
版权属于:

香草物语

本文链接:

https://www.xiangcaowuyu.net/app/lint-found-errors-in-the-project-aborting-build.html(转载时请注明本文出处及文章链接)

评论 (0)
  1. CiXY 闲逛
    MacOS · Safari

    谢谢

    2018-06-29 回复