Search code examples
androidandroid-resourcesandroid-lint

Warnings in xml resources


Yesterday I installed ADT plug-in again as I was having problems (intermittent) with the version I already had. The thing is, I'm not getting warnings in all my xml resources. I am pretty darned sure I haven't seem them before. Some of these are annoying because I cannot do anything about it:

Nested weights are bad for performance
The resource R.attr.TextAppearance_Group_Small appears to be unused
Replace "..." with ellipsis character (…, …)?

Others that I've had to fix include:

This tag and its children can be replaced by one <TextView/> and a compound drawable
[Accessibility] Missing contentDescription attribute on image

Is there any way to suppress these warnings? We have a zero tolerance policy which does not allow us to check-in code with warnings?


Solution

  • These are warnings of the new lint tool for android, which got introduced with the latest tools. You can change the priority of the messages in Eclipses preferences.

    Go to Window -> Preferences -> Android -> Lint Error Checking

    enter image description here

    Note though that this only affects your local installation. Hiding these messages will not fix the underlying issue(s). I guess someone checking your code on a different machine with different preferences may get the warnings nontheless.