安卓:打包apk时出现Execution failed for task ‘:app:lintVitalRelease 或 Lint infrastructure error

Execution failed for task ':lintVitalRelease'

程序可以正常运行,但是打包apk的时候报Execution failed for task ‘:app:lintVitalRelease导致打包失败,原因是执行lintVitalRelease失败了,存在错误。解决办法:在app模块的build.gradle的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
}

猜你喜欢

转载自blog.csdn.net/weixin_39114763/article/details/134401540
今日推荐