Android的删除未使用的资源资源、Android

2023-09-06 18:22:50 作者:一步之错,步步错

可能重复:结果  Remove从Android项目中的所有未使用的资源

我工作的一个项目,这是一个浩大的工程。它由许多图像和布局。我需要从项目只从一个命令删除未使用的图像和布局。当我用Google搜索 HTTP://$c$c.google.com/p / Android的未使用的资源/ 我看到这个链接的机器人。

,但有可作相同的没有多的信息。任何人可以帮助我知道步骤删除未使用的文件。

感谢

解决方案

更​​新到ADT 16和使用的Andr​​oid林特。这实在是了不起的工具。

  

Android的Lint是为ADT 16(和工具16)的新工具,它会扫描Android项目来源潜在的bug。

 以下是类型的错误,它会查找的一些例子: - 缺少翻译(和未翻译) - 布局性能问题(所有问题用来寻找旧layoutopt工具,并且更) - 未使用资源 - 不一致的数组大小(当阵列中的多个配置被定义) - 可访问性和国际化的问题(硬codeD字符串,缺少contentDescription等) - 图标的问题(如丢失密度,重复的图标,错尺寸等) - 可用性问题(如不指定文本字段输入型) - 明显错误还有很多。 

Possible Duplicate: Remove all unused resources from an android project

Android 如何去除无引用资源

I am working on one project which is an huge project. It consists of many images and layouts. I need to delete the unused images and layouts from the project from just one Command. When i googled http://code.google.com/p/android-unused-resources/ i saw this link for android.

but there is no much information available for the same. Can anybody help me to know the steps to remove unused files.

Thanks

解决方案

Update to ADT 16 and use Android Lint. It is really amazing tool.

Android Lint is a new tool for ADT 16 (and Tools 16) which scans Android project sources for potential bugs.

Here are some examples of the types of errors that it looks for:

- 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
and many more.