Warnings in xml resources

ぐ巨炮叔叔 提交于 2019-12-01 07:07:48

问题


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?


回答1:


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

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.



来源:https://stackoverflow.com/questions/8575834/warnings-in-xml-resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!