xml 资源中的警告
昨天我再次安装了 ADT 插件,因为我已经拥有的版本遇到了问题(间歇性)。问题是,我没有在所有 xml 资源中收到警告。我非常确定我以前没有见过他们。其中一些很烦人,因为我对此无能为力:
Nested weights are bad for performance
The resource R.attr.TextAppearance_Group_Small appears to be unused
Replace "..." with ellipsis character (…, …)?
我必须修复的其他问题包括:
This tag and its children can be replaced by one <TextView/> and a compound drawable
[Accessibility] Missing contentDescription attribute on image
有什么方法可以抑制这些警告吗?我们有零容忍政策,不允许我们签入带有警告的代码?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些是针对 Android 的新 lint 工具的警告,该工具是随最新工具一起引入的。您可以在 Eclipse 首选项中更改消息的优先级。
转到
窗口 ->首选项->安卓-> Lint 错误检查
请注意,这只会影响您的本地安装。隐藏这些消息不会解决根本问题。我想有人在具有不同偏好的不同机器上检查您的代码可能会收到警告。
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.