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
0
votes
1 answer

android lint on ubuntu different from mac

I ran lint boilerplate_android on Mac and I got: Scanning 8.3.0: .......................... Scanning 8.3.0 (Phase 2): Scanning debug: . Scanning debug (Phase 2): Scanning 4.7.0:…
Gobi Dasu
  • 459
  • 1
  • 6
  • 22
0
votes
1 answer

Issue: Implementing app restrictions and Lint Errors in app_restrictions.xml

I am working on Android MDM and have the app_restrictions.xml file under /src/main/res/xml/ folder. The MDM I am using is not showing me the value of the restriction, not even the default value. All the steps mentioned in this link has been followed…
Surbhi
  • 33
  • 1
  • 7
0
votes
1 answer

Installed Android Studio, can I use command line tools (lint adb etc) without downloading the SDK separately?

I just installed Android Studio, it took a bit of time and I saw it downloading the SDK during the installation process. So, I guess Android Studio somehow contains the SDK. Now, Android Studio is OK but for my scripts I also need command line tools…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0
votes
1 answer

Android Studio lost some lint item and reconfigure lint severity does NOT work

Lint checking reports some error like: NotSibling, ExtraTranslation, MissingTranslation... In configure UI of link checking of Android Studio, I can NOT find "NotSibling" item, but Eclipse has it. Also, re-configure severity of "MissingTranslation"…
RoFF
  • 529
  • 5
  • 27
0
votes
0 answers

Upgrading to Android Gradle Plugin 1.3 fails build due to check failure in Espresso tests

Before upgrading to Android Gradle Plugin 1.3, the custom lint scope was only Android source files. After I upgraded to 1.3.1, my tests files started getting checked and as a scenario fails my custom lint rule, the build fails. There is no…
Nazneen
  • 266
  • 3
  • 16
0
votes
1 answer

Android Studio does not find suspicious code

When running Analyze > Inspect Code Android Studio does not start the inspection progress. Instead it shows the message 'No suspicious code found' even if there is suspicious code. Code inspection worked in the same project once and works well in…
Alex
  • 141
  • 1
  • 10
0
votes
2 answers

Lint does not find an Activity from a Library

I have a library project (in ADT) containing an Activity. This library is used by a project that uses this Activity. All this works perfectly well. The Activity is declared in the main project's manifest, it compiles, it runs, it does everything I…
njzk2
  • 38,969
  • 7
  • 69
  • 107
0
votes
1 answer

What layout should I use for my app? Lint error?

This is my first app/project ever in android, I'm learning on the fly. I have a warning in lint "youramounts.xml has more than 80 views, bad for performance" I know the logic behind the matter just not how to correct it. How do i correct this error?…
0
votes
1 answer

How can I use the jenkins android lint plugin in my android project ,what can I write in bulid.xml?

I want to use the jenkins android lint plugin in my android project , but I don't know what can I do , something write in android project build.xml? please help me .
0
votes
1 answer

Android gradle file to remove unused resources

I would like to remove unused resources from my final release apk file created. I am able to configure proguard but its limited to Java files only. I would like to remove unused layouts, strings, pngs etc Any ideas? I read android link can help; got…
chendu
  • 684
  • 9
  • 21
0
votes
2 answers

How to run different code for different SDK levels without errors in eclipse

Inside a method I run a line which is different for different SDKs. And the lint marker always marks it as an error and suggests me to add a new api annotation for the whole method, but this is only one line of code I think it's pointless to create…
RCB
  • 2,253
  • 2
  • 25
  • 49
0
votes
1 answer

Android Drawable XHDPI only - avoid lint warning

In my project I have drawables that are used only in case of tablets. So if I put the images on the XHDPI, lint complains that the image should be in the other dimensions too. Is ignoring lint the best approach in this situation?
David
  • 3,971
  • 1
  • 26
  • 65
0
votes
1 answer

Problems with generated lint.xml from ADT

I work in a team with multi-platform environments and we're having some issues with the generated lint.xml file. This file is also used by our Jenkins build system which is running on Mac OS X (it needs to be a Mac because this system will be used…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
0
votes
1 answer

Lint: “ is not translated in ” error

My Android app recently started throwing Lint errors when compiling. I'm getting is not translated in . It tells me If an application has more than one locale, then all the strings declared in one language should also be translated…
karl
  • 3,544
  • 3
  • 30
  • 46
0
votes
1 answer

Android XML Style/Theme Version Compatibility, Considering Development Safety with Eclipse/lint

It appears the best way to develop an Android application today is to target android-17 in project.properties along with minSdkVersion "whateversuitsyou" and targetSdkVersion 17 in the manifest. In this configuration, the standard lint checks will…
1 2 3
22
23