2012-07-11 37 views
0

檢查參考有沒有什麼辦法來檢查從String.xml如何從String.xml

String引用我在String.xml許多字符串,但我想刪除一些不用的字符串的。 我沒有找到任何方法來檢查其他類使用的字符串。

所以我怎樣才能得到關於使用字符串在String.xml

信息來源,如果我逐一檢查將需要整整一天。

+3

http://tools.android.com/tips/lint/ – 2012-07-11 05:30:04

+0

http://stackoverflow.com/questions/6373482/remove-all-unused-resources-from-an-android-project – 2012-07-11 05:30:12

+1

德勒他們任何一個,看看它是否被引用或不。如果是,那麼保持它否則刪除它 – AkashG 2012-07-11 05:31:05

回答

1

林特可以幫助你。嘗試檢查你的項目。 看屏幕: enter image description here

+0

我同意使用LINT ... kudos – 2012-07-11 05:57:27

0

在命令行中,你可以使用android lint(如the comment by @Lalit Poptani說的)。在項目中,你只需要輸入

ant lint 

的警告看起來像

警告:資源R.string ....似乎是未使用
[UnusedResources]
[棉絨]一些文字