Question:
Does anyone have a quick way for removing all the extra resources in an Android application that are not being used(referenced) in my code?
Explanation:
I've noticed that once I finally get one of my Android applications ready to ship, there are usually a lot of unwanted resources within my application. I usually have some extra drawables that aren't being used because I switched them out with new ones. I also have extra String resources and even some extra layouts that aren't used anywhere in my application (there is no reference to them in the java code). I want my applications to take up the least amount of space possible on the user's phone.
Yes, the ADT in Eclipse includes something called "android lint".
http://tools.android.com/tips/lint
In a nutshell, it points out problems with your app. One thing it notes is unused resources. It doesn't automatically remove them.
You can access it from Eclipse through (right click project) > android tools > run lint.
besides the builtin Lint: http://code.google.com/p/android-unused-resources/
it can't remove them automatically but it should be able to tell you which resources are unused.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With