Reputation: 11608
The matter: I used many icons and pictures while developing an android application, later I replaced many of them but kept the old ones in case I would need to use them again. Now I have a huge amount of .png's in my drawable
folder, many are now unused and it would take ages to manually sort them out. Is there a way to detect drawables to which no references exist?
Upvotes: 3
Views: 3053
Reputation: 3107
In my experience, Lint does not detect unreferenced PNGs. It finds unreferenced layouts and drawable XML files like shapes and selectors but not PNGs. I stumbled upon this Python script for removing unreferenced PNG drawables. It worked well with my project but, as the documentation for it says, make sure you are using source control just in case.
https://github.com/instructure/android-ImageSweep
Upvotes: 4
Reputation: 539
You can use Android Lint Tool, follow the link I provide , as an overview it states:
As an alternative this project might help you (pretty easy to use):
Hope it's useful...
Upvotes: 12