Questions tagged [android-lint]

Android Lint is a tool in ADT which scans Android project sources for potential bugs.

Android Lint is a tool in which scans project sources for potential bugs. It is available both as a command line tool, as well as integrated with .

Here are some examples of the types of errors that it looks for:

  • Missing translations (and unused translations)
  • Layout performance problems (all the issues the old layoutopt tool used to find, and more)
  • Unused resources
  • Inconsistent array sizes (when arrays are defined in multiple configurations)
  • Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
  • Icon problems (like missing densities, duplicate icons, wrong sizes, etc)
  • Usability problems (like not specifying an input type on a text field)
  • Manifest errors

and many more.

336 questions
2
votes
0 answers

Android Lint unused resource false positive

I have been getting this strange warning in Eclipse. I'm not sure how to reproduce this error but here is what I have: One library project with code and no resources Two library project with resources and code One app project with resources and code…
superjugy
  • 301
  • 4
  • 12
2
votes
3 answers

Every time i make some changes android lint error comes...why so?

I am using robotium tool in eclipse to create test cases. My doubt is every time i make any changes in any of the file i get error like Call requires API level 3 (current min is 1)... Android Lint Problem and when i do right click on project and…
NJF
  • 435
  • 7
  • 26
2
votes
3 answers

Ignoring Android Lint "MissingTranslation" check for partial translations

In my app I have a set of languages with complete translations, and another set of languages with translations for only a few strings. For the languages with complete translations, I want Lint to warn me about MissingTranslations. For the languages…
Frank Harper
  • 3,027
  • 3
  • 30
  • 41
2
votes
1 answer

Lint Warning ExportedContentProvider

I have an exported ContentProvider that I use for accessing images the user wants to share through other apps. Simply, the user clicks on a share button in my app, I show her a list of apps that can share the image and she picks one of the apps…
Catalin Morosan
  • 7,897
  • 11
  • 53
  • 73
2
votes
3 answers

How to add a string to the default values folder only?

I have a res/values folder containing a strings.xml file and a res/values-XX folder containing a strings.xml file (for each of the languages XX I support). At the moment, all my strings.xml files contain the same strings (same string names,…
Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
2
votes
1 answer

Lint is warning me about API accesses not supported in all verions but it works everywhere?

Lint is giving me this error a fair amount of times: "match_parent" requires API level 8 (current min is 4), use "fill_parent" instead I understand the error. I'm using match_parent in all of the XML layouts my app uses and never use fill_parent…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
1
vote
2 answers

Lint warning Android

This tag and its children can be replaced by one and a compound drawable Issue: Checks whether the current node can be replaced by a TextView using compound drawables. A LinearLayout which contains an ImageView and a TextView can be more …
Shruti
  • 1
  • 13
  • 55
  • 95
1
vote
2 answers

Android Lint Tool

I have updated my Android SDK to Revision 16 but I can't seem to find Android Lint anywhere in my Eclipse IDE (Preferences -> Android). Are there any additional things to be done? I need some help. Thanks.
Lawrence Gimenez
  • 2,662
  • 4
  • 34
  • 52
1
vote
1 answer

Custom Lint - Checking for gradient tag in vector fails

I'm writing a custom lint rule to catch if android:src namespace is being used for displaying vector drawables which have gradient tag in them instead of app:scrCompat namespace. Android Studio is able to detect the errors after writing this…
Veeresh Charantimath
  • 4,641
  • 5
  • 27
  • 36
1
vote
1 answer

I do not want to upgrade jetpack compose from RC to Alpha

... but also I do not have to see that lint warning. It suggest to upgrade from 1.3 RC to 1.4 Alpha. What would you suggest to do?
Solvek
  • 5,158
  • 5
  • 41
  • 64
1
vote
0 answers

Android Studio inspection profile doesn't contain all the rules

It seems to me that Android Studio inspection profile doesn't allow me to choose the same inspection that is used by Gradle command ./gradlew lint. I'm interested in running "LiveData value assignment nullability mismatch" (the one that can be…
Andrzej Zabost
  • 1,387
  • 11
  • 26
1
vote
0 answers

Android Studio Lint and Code Inspection not picking up VectorPath issueId

I introduced a vector drawable that has a long path (> 800 characters) in my Android app. However, when I perform code inspection (Code --> Inspect Code) or run ./gradlew app:lintDebug on my Android app, I do not see the VectorPath issue being…
VIN
  • 6,385
  • 7
  • 38
  • 77
1
vote
0 answers

Lint check to detect Implicit Internal Intent vulnerability

We got an error in Play Store Console about our app having an "Implicit Internal Intent" vulnerability (error info). The error is fixed, however we would like to add a way to detect these vulnerabilities sooner. Is there any Android Lint Check or…
Jenny
  • 323
  • 1
  • 2
  • 9
1
vote
2 answers

Upgrading android gradle plugin from 4.1.3 to 7.0.4 causes gradle process crashes when running lintDebug

I am trying to upgrade my Android Gradle plugin from 4.1.3 to 7.0.4 also lint version to 30.0.4 I am using Gradle version 7.3.3 My Gradle daemon crashes now while running lint target on CI process with error Gradle build daemon disappeared…
Subodh Nijsure
  • 3,305
  • 5
  • 26
  • 45
1
vote
0 answers

How can we get the root project path in android lint check code?

I have a multi projects structure. One is the lint project including lint logic code. I wanna get the root project dir. I test some ways. println("mainProject.dir ${context.mainProject.dir}") println("mainProject.dir ${context.project.dir}") But…
Victor Choy
  • 4,006
  • 28
  • 35