Gradle build: Execution failed for task ':app:lint'

Add this in your app/build.gradle file

android {
    //...
    lintOptions {
        abortOnError false
    }
}

You have some lint issues while you are bulding the app module.

You can find all issues found in the report generated in Project\module\build\outputs.
Here you will find the html file and the xml file with the lint report.

Using this script in the app\build.gradle

android {
    lintOptions {
        abortOnError false
    }
}

you can disable the block but it is not the best practice.
You should analyze the lint report to solve each point.


  1. Switch to project view
  2. Then, project/app/build/reports/lint-results
  3. Now, you will find the lint-result files in two formats - 1) xml and 2) html.

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.

Screenshot of lint results