是否有工具来查找未使用的资源在Android项目?工具、项目、资源、Android

2023-09-05 08:20:41 作者:烟花再美,只是瞬间

我想找到任何未使用的资源,在我的Andr​​oid项目 - 这包括字符串,IDS,可绘制整数等

I'd like to find any unused resources in my Android project - this includes strings, ids, drawables, integers etc.

难道一个工具来做到这一点目前存在(preferably为Eclipse)?

Does a tool to do this currently exist (preferably for Eclipse)?

推荐答案

如果您使用的IntelliJ,其中有支持Android的免费社区版,您可以通过打开生成的R.java文件做到这一点(根/ R.java )。未使用的资源将被标记为不被引用在项目中的任何地方发出警告。

If you use IntelliJ, which has Android support in the free community edition, you can do this by opening the generated R.java file (gen/R.java). The unused resources will be marked with a warning for not being referenced anywhere in your project.

我会感到惊讶,如果Eclipse不做同样的事情。

I'd be surprised if Eclipse doesn't do the same thing.

 
精彩推荐
图片推荐