Dav*_*ide 25 android gradle android-studio android-gradle-plugin android-studio-2.0
我正在使用Android Studio 2.0,当发生奇怪的事情时,我正试图运行我的程序.我运行了gradle的build命令,我收到了这个错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lint'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.197 secs
Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
10:41:28: External task execution finished 'build'.
Run Code Online (Sandbox Code Playgroud)
所以...到底是什么意思?我应该这样做来解决这个问题,将代码添加到gradle.build,但问题是:为什么我收到此错误消息?
请救救我们!
Pin*_*nks 31
将此添加到您的 build.gradle
android {
lintOptions {
abortOnError false
}
}
Run Code Online (Sandbox Code Playgroud)
Gab*_*tti 18
在构建应用程序模块时,您会遇到一些lint问题.
您可以在中生成的报告中找到所有问题Project\module\build\outputs.
在这里,您将找到带有lint报告的html文件和xml文件.
在中使用此脚本 app\build.gradle
android {
lintOptions {
abortOnError false
}
}
Run Code Online (Sandbox Code Playgroud)
您可以禁用该块,但这不是最佳做法.
您应该分析lint报告以解决每个问题.
Avi*_*mer 11
您可以按原样查看这些文件.但是,我发现在浏览器中查看lint结果很容易.只需右键单击html文件,然后在浏览器中选择视图即可.
它会在我的Chrome浏览器中打开,如下图所示.
我认为找到错误而不是忽略错误会更好.
试试这个:
在Gradle Console中找到"将HTML报告写入文件 ",打开指定的HTML文件,您将找到一份棉绒报告
转到您的错误并修复它们
| 归档时间: |
|
| 查看次数: |
38142 次 |
| 最近记录: |