查找出来,如果​​资源被使用 [英] Find out if resource is used

查看:94
本文介绍了查找出来,如果​​资源被使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种有效的方式,以找出是否一个资源(主要是被拉伸)是用JAVA或XML文件中。

I am looking for an efficient way to find out if a resource (mostly a drawable) is used in java or in an XML file.

的问题是,在我的当前项目的可绘制经常改变,现在我有一些可绘,可能永远不会被使用。

The problem is, that on my current project the drawables are changed often and now I have some drawables, which might never be used.

有没有一种工具/方法来找到那些未使用的可绘而不搜索每个文件名,在整个项目?

Is there a tool/way to find those unused drawables without search each filename in the whole project?

推荐答案

我写了一个工具,基于Python来解决这个问题。由于这并非直接分享它的地方,我创建了一个项目页面,该页面现在处于脱机状态。

I wrote a tool based on python to solve this problem. As this is not the place to share it directly, I created a project page which is now offline.

更新:
开发自棉绒已经停止可以做同样的,并已经包含在Android SDK中。

UPDATE:
The development has stopped since Lint can do the same and is already included in the Android SDK.

这篇关于查找出来,如果​​资源被使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆