在XML资源警告 [英] Warnings in xml resources

查看:131
本文介绍了在XML资源警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我装了ADT插件再次,因为我是有问题(间断)与我已经拥有的版本。关键是,我没有得到警告,在我所有的XML资源。我是pretty的非常确信我没有好像之前。其中有些是讨厌的,因为我不能做任何事情:

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

有没有什么办法可以燮preSS这些警告?我们有一个零容忍政策,不允许我们办理入住手续code与警告?

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?

推荐答案

这些都是新的皮棉工具的警告机器人,它得到了最新的工具推出。您可以更改消息的优先蚀preferences。

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.

窗口 - &GT; preferences - &GT; Android的 - &GT;林特错误检查

请注意,虽然,这只会影响你的本地安装。隐藏这些消息不会解决根本问题(S)。我想一个人在不同的机器有不同的preferences可能会收到警告nontheless,检查您code。

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.

这篇关于在XML资源警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆