最近一个项目在打包时出现打正式包打不出来,测试的却可以,日志上出现这样的提示:

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

百度说是因为出现了编译时会被忽略的错误,于是按照日志的提示 debug option了之后就清楚的看到了是因为有个类没有提供默认的构造函数造成的。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐