We have a large (somewhat unwieldy) project, that definitely has files, both Java classes and XML files (and probably images as well), that are no longer used. Is there a tool or a way to find out which files are not referenced in the project?
I saw this question, but it's not Android specific: Find unused classes in a Java Eclipse project
In eclipse, you can actually use the Android Lint tool. Click on Window, then "Run Lint Tool". It will find all of the problems in your code it thinks should be corrected. One of the problems it finds "The resource R.id.xxx appears to be unused" and will highlight as a warning all files that it believes are not used in your project. So far I've found it to be pretty accurate.
I use, and like Classpath Helper:
http://classpathhelper.sourceforge.net/
This works with Android projects inside of Eclipse.
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