Android Studio报错Fix the issues identified by lint, or create a baseline to see only new errors


一、问题描述

Android Studio 打包报错 Fix the issues identified by lint, or create a baseline to see only new errors:

Lint found fatal errors while assembling a release target.

Fix the issues identified by lint, or create a baseline to see only new errors:

android {
    
    
    lint {
    
    
        baseline = file("lint-baseline.xml")
    }
}

For more details, see https://developer.android.com/studio/write/lint#snapshot

二、解决方法

1.方法1:修改配置,将错误屏蔽

lint 是 Android官方提供的代码扫描工具,修改配置,将 lint 错误屏蔽,在 build.gradle 文件中加入:

lintOptions {
    checkReleaseBuilds false
    abortOnError false
}

2.方法2:通过错误报告查找原因

错误报告文件为 lint-results-release.html,如下图:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u012069313/article/details/124946329
今日推荐