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

今天在打包时的时候出现了这个错导致打包不成功,具体原因可以从报错日志中看到是因为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]
  • 7
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值