Reputation: 574
For the last four builds, all of them have failed but I can not figure out why. It is giving me an error, but when I check the code in my IDE (Android Studio), I have no errors, but just warnings. Is it interpreting the warnings as errors? Here is the error given by the log:
Lint found 1 errors and 6 warnings
:mobile:lint FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mobile:lint'.
> Lint found errors in the project; aborting build.
Upvotes: 0
Views: 703
Reputation: 50548
This is because your gradle is configured to fail the build if your code does not match LINT rules.
You can do any of the following attempts:
Fix everything in your code that LINT complains about (Most recommended)
Silence the lint by setting quiet mode or abortOnError
to false:
lintOptions {
quiet true
checkReleaseBuilds false
// if true, stop the gradle build if errors are found
abortOnError false
}
lint
at the beginning of your tasks
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
}
-x lint
argument like: gradlew assemble -x lint
Upvotes: 1