Is there a tool to find unused resources in an Android project?(是否有工具可以在 Android 项目中查找未使用的资源?)
问题描述
我想在我的 Android 项目中查找任何未使用的资源 - 这包括字符串、ID、可绘制对象、整数等.
I'd like to find any unused resources in my Android project - this includes strings, ids, drawables, integers etc.
目前是否存在执行此操作的工具(最好用于 Eclipse)?
Does a tool to do this currently exist (preferably for Eclipse)?
推荐答案
如果你使用 IntelliJ,它在免费社区版中支持 Android,你可以通过打开生成的 R.java 文件(gen/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.
这篇关于是否有工具可以在 Android 项目中查找未使用的资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:是否有工具可以在 Android 项目中查找未使用的资源?
基础教程推荐
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
