Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android / Eclipse - finding unused files (Java/XML) [closed]

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

like image 264
StackOverflowed Avatar asked Jul 17 '12 18:07

StackOverflowed


2 Answers

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.

like image 134
ajacian81 Avatar answered Oct 01 '22 09:10

ajacian81


I use, and like Classpath Helper:

http://classpathhelper.sourceforge.net/

This works with Android projects inside of Eclipse.

like image 22
Josh Avatar answered Sep 29 '22 09:09

Josh