3

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?

Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
Code Poet
  • 11,227
  • 19
  • 64
  • 97
  • You can't replace `...` with `…`? You can't remove an unused resource? Could you explain that to me? – WarrenFaith Dec 21 '11 at 09:34
  • I cannot remove an unused resource because it's not unused. It is being referenced elsewhere in code not through xml. Nested weights are bad for performance, I know, but I need to use it unless someone can explain to me how I could evenly layout a LinearLayout having two children. I will not replace (...) with (…) because I don't want to get calls from my localization vendors asking me to explain what (…) is. Hope it make sense. – Code Poet Dec 21 '11 at 10:01
  • I'm also getting warnings for code that does not belong to me. I have the sources, but don't have the liberty to change it. – Code Poet Dec 21 '11 at 10:05
  • Just a note, you shouldn't have to use the HTML escape for the ellipsis character. The literal character "…" should suffice unless you're parsing HTML out of that token (which is generally a bad idea anyway). Of course that doesn't prevent the translators from replacing it with three periods, but at least it shuts Lint up :) – Cheezmeister Dec 10 '12 at 18:52

1 Answers1

11

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.

  • 2
    Thanks. I found this http://tools.android.com/tips/lint which suggests a mechanism to add warning we want to ignore into a lint.xml file. This file can then be checked in and others will not see the warning. – Code Poet Dec 21 '11 at 05:22