I'm using Android Studio 2.0 and I was trying to running my program when something strange happened. I ran the build command of the gradle and I got this error:
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'.
And so... What the hell is that? I'm supposed to do to solve this problem adding the code to the gradle.build, but the question is: why I got this error message?
Please save me guys!
The Gradle Lint plugin is a pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts and related files.
In this way the clean task (with the type=delete) deletes the build directory when it runs. It is useful when you modify some config files like the settings. gradle which can requires a complete clean.
Lint Baseline Test First, create a new project. Perform a Gradle sync. Then run lint: Analyze > Inspect Code; choose the whole project. Lint should now run, the Inspections View opens up, and in the bottom right corner a bubble tells you that lint has created a baseline file with the current issues.
Add this in your app/build.gradle
file
android { //... lintOptions { abortOnError false } }
You can view these files as is. However, I find viewing the lint results in a browser to be easy on the eyes. Just right-click on the html file and choose view in browser.
It opens up like the image below in my Chrome browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With