2013-07-09 20 views
2

但是這不是一個合乎邏輯的問題,我仍然很感興趣知道我是否有任何閒置文件,我沒有在我的項目中使用。一個長期的項目,我們只是不知道哪個是實際的文件,哪個是它的副本。有時候我們只是創建一些XML文件來檢查佈局和其他效果,如選擇器或一些自定義drawable.I的意思是,雖然這些文件從來沒有得到當我們回到關於文件的真實身份和使用的代碼時,仍然會執行它的邏輯混亂。有什麼辦法可以知道我們的項目中沒有使用哪個xml文件

我讀過Proguard在製作apk文件之前刪除所有未使用的文件。它是否也刪除所有這些xml文件?

我對proguard概念有點新。 謝謝。

+1

,如果你發現了這事,請與大家共享,我想清理我的項目太:)) – Giant

回答

3

您可以使用AndroidLint工具掃描您的項目並返回大量建議,然後使用所有未使用的資源!

http://tools.android.com/tips/lint

- Missing translations (and unused translations) 
- Layout performance problems (all the issues the old layoutopt tool used to find, and more) 
- Unused resources 
- Inconsistent array sizes (when arrays are defined in multiple configurations) 
- Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc) 
- Icon problems (like missing densities, duplicate icons, wrong sizes, etc) 
- Usability problems (like not specifying an input type on a text field) 
- Manifest errors 
+2

注:Android的Lint是在ADT 16(和工具16)推出了一個新的工具。我發佈了幾秒鐘後:) :) – AlexBcn

+0

我看到了你的答案:),比我的更完整...謝謝 – Angudroid

+0

我也謝謝你們倆。我會毫無疑問地看看android lint。 –

相關問題