[英]How to check reference from String.xml
Is there any way to check String reference from String.xml 有什么方法可以从String.xml检查String引用
I have many String in String.xml but i want to remove some unused String's. 我在String.xml中有很多String,但是我想删除一些未使用的String。 i am not finding any way to check that which String used by other class's. 我没有找到任何方法来检查其他类使用的字符串。
so how can i get infomation about used String's in String.xml 所以我如何在String.xml中获取有关使用过的String的信息
if i check one by one it will take whole day. 如果我一一检查,将需要一整天。
Lint can help you. 皮棉可以帮助您。 Try to check your project. 尝试检查您的项目。 Look at the screen : 看屏幕:
In Eclipse if you updated android sdk Lint tool will automatically come with a plugin, it will give warnings about xml resources which are not referenced. 在Eclipse中,如果您更新了android sdk,则Lint工具将自动附带一个插件,它将给出有关未引用的xml资源的警告。
Check this link 检查此链接
http://tools.android.com/recent/neweclipselintui http://tools.android.com/recent/neweclipselintui
On the command line, you can use android lint
(as said in the comment by @Lalit Poptani ). 在命令行上,您可以使用android lint
(如@Lalit Poptani的注释中所述)。 Inside the project, you just type 在项目内部,您只需键入
ant lint
The warnings look like 警告看起来像
Warning: The resource R.string.... appears to be unused 警告:资源R.string ....似乎未使用
[UnusedResources] [未使用的资源]
[lint] some text [皮棉]一些文字
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.