Lint found fatal errors while assembling a release target.

Android packaging error:

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
      }
  }
  ...

 

Solution:

 

In fact, the solution is already in the error message, that is to add a configuration in the build.gradle of corresponding project. In android{} block of build.gradle of app, add the following code:

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 getDefaultProguardFileproguard-android.txt´), ´proguard-rules.pro´
        }
    }

    //Add the following configuration
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

Then rerun Generate Signed Apk, everything is ok now.

posted @   brave-sailor  阅读(1305)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
历史上的今天:
2015-09-11 Android:自定义滚动边缘(EdgeEffect)效果
2015-09-11 Android ViewGroup事件分发机制
2015-09-11 Android View 事件分发机制 源码解析 (上)
2015-09-11 探究requestDisallowInterceptTouchEvent失效的原因
2015-09-11 android事件拦截处理机制详解
2015-09-11 Android中滑屏实现----手把手教你如何实现触摸滑屏以及Scroller类详解
2015-09-11 Android Scroller简单用法
点击右上角即可分享
微信分享提示