Reputation: 11032
I just completed my android app. I want to clean up the unused layout files and other resource files such as images and drawables and strings which are not referenced in the actual code. How do I do that? Is there any option to do this in Android Studio?
Upvotes: 9
Views: 9419
Reputation: 792
You can easily search for unused resources from Android Studio. Select res folder -> 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).
Click on remove all unused resources.
Upvotes: 1
Reputation: 25312
You can able to remove unused resources by following way.
Analyze
> Inspect Code
and find Unused Declarations and Methods.
Android Studio -> Menu -> Refactor -> Remove Unused Resources.
Upvotes: 19