您好,欢迎来到遇乐旅游网。
搜索
您的当前位置:首页Android Studio 解决打包时lint task执行失

Android Studio 解决打包时lint task执行失

来源:遇乐旅游网

Android Studio 执行 lint task的时候 可能会遇到如下错误。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lint'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or add the following to your build script to proceed with errors:
  ...
  android {
      lintOptions {
          abortOnError false
      }
  }
  ...

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

这个是因为代码不符合规范,lint检查时报错,因此中断了整个编译过程。
只要在当前主项目(即app)或者引用第三方项目(即model)build.gradle文件内增加如下代码,

android {
    ...
  lintOptions {
      abortOnError false
  }
    ...
}

注图:


QQ截图20170905154227.png

Copyright © 2019- yule263.com 版权所有 湘ICP备2023023988号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务