其他分享
首页 > 其他分享> > android – Gradle build:任务执行失败’:app:lint’

android – Gradle build:任务执行失败’:app:lint’

作者:互联网

我正在使用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'.

所以…到底是什么意思?我应该这样做来解决这个问题,将代码添加到gradle.build,但问题是:为什么我收到此错误消息?

请救救我们!

解决方法:

在build.gradle中添加它

android {
    lintOptions {
        abortOnError false
    }
}

标签:android,android-gradle,android-studio,gradle,android-studio-2-0
来源: https://codeday.me/bug/20191004/1853280.html