在机器人的strings.xml重复字符串资源 [英] duplicate string resource in strings.xml android

查看:625
本文介绍了在机器人的strings.xml重复字符串资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有其他方式的Andr​​oid检查重复的字符串资源?

Are there other ways to check for duplicate string resource in Android?

说,我有这两个字符串:

say I have these 2 strings:

<!-- some other strings -->
<string name="A">I'm A</string>
<string name="A">I'm A</string>
<!-- some other strings -->

在我的Eclipse,这不会导致任何错误或警告,即使我尝试使用它掉毛不显示。我怎么能看到这样的问题呢?

In my Eclipse, this doesn't cause any error or warnings, even if I tried using lint it does not show up. How can I see such problems then?

推荐答案

在Eclipse中:


  1. 打开你的项目属性

  2. 选择Android的皮棉preferences

  3. 确保该DuplicateDefinition标志被选中。

这会警告你在你的资源文件中的一个有一个重复的资源每次弹出。

This will pop up a warning each time you have a duplicate resource in one of your resource files.

希望这有助于:)

这篇关于在机器人的strings.xml重复字符串资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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