Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Lint report <issue> duplication

Tags:

I run ./gradlew clean lint command in console and get Lint report in build/lint/ReleaseOutput.html and build/lint/ReleaseOutput.xml I got 6 times the same error: enter image description here And I also see 6 times the same times one issue in XML file:

<issue    id="UselessParent"    severity="Error"     ... </issue> 

So, why it has happened and how to avoid such problem? Because one issue multiply 6 and displayed incorectly in Jenkins statistics.

UPDATE:

I found that this bug related to gradle lint task. To get lint metrix Gradle build few times:

file="build/manifests/release/AndroidManifest.xml" file="build/manifests/debug/AndroidManifest.xml" 

So it also can double total number of issues.

like image 757
Borys Avatar asked Nov 19 '13 14:11

Borys


People also ask

What are lint errors in Android?

The lint tool checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization. When using Android Studio, configured lint and IDE inspections run whenever you build your app.

How do you check for lint errors?

Tip: If you are using Android Studio, you can use the File > Settings > Project Settings > Inspections feature to manage the lint checking to your Java or XML source files.

What are lint warnings?

In many cases, lint warns you about incorrect, error-prone, or nonstandard code that the compiler does not necessarily flag. The lint program issues every error and warning message produced by the C compiler. It also issues warnings about potential bugs and portability problems.

How do you use lint on Android?

To utilize Lint or just run inspections in your project, add Lint inspection to the lint. xml file or manually pick the list of issues to be configured by Lint in your project using Android Studio. Configure the lint file: Add the list of issues to be configured in the lint.


1 Answers

Also you can run ./gradlew clean lintDebug so lint only analyze the debug build, in that way you increase the speed and you get only the warning for that build. Also you have to had in mind that if you use flavors the warnings could be reported by build type and also by flavor.

like image 163
jamesbluecrow Avatar answered Sep 22 '22 06:09

jamesbluecrow