5

I am getting lint error in android studio as

Error: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 } }

Information:BUILD FAILED Information:Total time: 7.288 secs Information:1 >error Information:0 warnings

Build is getting failed But it is not showing where exactly the error and even IDE(Android studio) is also not displaying any error mark in files. How to redirect lint error to source file.?

I don't want to skip the lint check.

Please help me.

2 Answers 2

12

From the command line, run gradlew lintDebug (or gradlew lint[variantName] for a different variant).

This will generate a full lint report at /app/build/outputs. I recommend the HTML version (lint-results-debug.html). In there you will find all Android lint issues and their severity.

Alternatively, you can go to Analyze > Inspect Code in Android Studio to run lint. Switch the view to group them by severity- the errors are the ones blocking your build.

Sign up to request clarification or add additional context in comments.

3 Comments

How can one remove warnings and typos? Details of these variables are also shared when we group by severity.
Note that you may need to add the --debug or --info flag to generate the html report
If you only want to see vital lint error that causes 'release' to stop, then from the command line type: gradlew lintVital[variantName]
3

The erros reports with the lines and exactly erros font are found in: Your app release builds folder, then:appname/app/build/reports.

there you will find the lint-results-release-fatal. Open it in any browser to find the problems.

Hope it helps.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.