欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

ANDROID打包错误ERROR:EXECUTION FAILED FOR TASK ′:APP:LINTVITALRELEASE′.

程序员文章站 2023-01-23 08:07:07
android打包错误error:execution failed for task ′:app:lintvitalrelease′. 错误信息 error:executio...

android打包错误error:execution failed for task ′:app:lintvitalrelease′.

错误信息

error:execution failed for task ′:app:lintvitalrelease′.> 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} } ...

解决方案

其实解决方案已经提示出来了、就是在对应的项目build.gradle里面添加一个配置、在app的build.gradle里的android{}中添加如下代码、然后再次运行generate signed apk就正常了

android {
 compilesdkversion 23
 buildtoolsversion ′25.0.0′

 defaultconfig {
  applicationid "com.luzhiyao.sgongdoocar"
  minsdkversion 14
  targetsdkversion 23
  versioncode 5
  versionname "1.1.0"
 }
 buildtypes {
  release {
minifyenabled false
proguardfiles getdefaultproguardfile(′proguard-android.txt′), ′proguard-rules.pro′
  }
 }

 //添加如下配置就ok了
 lintoptions {
  checkreleasebuilds false
  abortonerror false
 }
}