Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which resources are not used in an android app

I would like to know if there is the way to find out which resources (layouts, strings, colors etc. from res-folder) are not used in my android project.

What I mean, in my app I have some old strings, which won't be used anymore and I would like to remove them from the string.xml

Thank you in advance.

Ps. I'm using Eclipse for developing

like image 957
Tima Avatar asked Apr 14 '11 11:04

Tima


People also ask

How do you find unused resources?

You can easily search for unused resources from Android Studio. Just press Ctrl Alt Shift i and type "unused resources" (without quotes). That will execute lint. Super easy way to run lint commands (and other stuff from IDE).

Where you declare resources that are used across the app?

The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc.


1 Answers

A swift google search brought up this project: http://code.google.com/p/android-unused-resources/

After running the jar, all the unused resources of your project are being displayed.

To run the jar just call java -jar AndroidUnusedResources.jar.

like image 157
keyboardsurfer Avatar answered Oct 10 '22 02:10

keyboardsurfer