Madhukar Hebbar
Madhukar Hebbar

Reputation: 3173

Lint error fixing

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.

Upvotes: 5

Views: 13563

Answers (2)

Thiago Silva
Thiago Silva

Reputation: 796

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.

Upvotes: 3

Bryan Herbst
Bryan Herbst

Reputation: 67189

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.

Upvotes: 12

Related Questions