Hm is it me or is the tool not working? I supplied it with a path to the root folder of my android project. But now it says that there is no file /path/to/project/root/gen/R.java. And that is correct because the R.java file is in gen/de/somepackage/anotherpackage/clientpackage/ Is there a fix for this?
–
JanuszNov 11 '10 at 11:50

I guess its better to create a ticket at the project page. I am active, so I will respond quick :)
–
WarrenFaithNov 11 '10 at 13:19

Doesn't work, had to hardcode my directory at "parseR(rclass)" it was looking for the R.java in C:\Workspace\Project_dir\gen\CVS\ and I gave the dir option '-i C:\Workspace\Project_dir'. So it needs more work but I got it to work at least.
–
JPMApr 7 '11 at 10:51

@JPM I don't get it. wasn't C:\Workspace\Project_dir not your project directory? Because in that case the gen folder should be directly in that project folder. Could you be a bit more specific in the error description, please.
–
WarrenFaithApr 12 '11 at 15:35

I thought I was, when I ran the program it said it couldn't find the R.java in "C:\Workspace\Project_dir\gen\CVS\".
–
JPMApr 13 '11 at 16:57

I updated my question with a link to a script I have written. This script might be also interesting for you. (I am always impressed on people writing bash scripts... +1 :)
–
WarrenFaithSep 24 '10 at 11:21

OMFG!!! I just gave it a try and you did an awesome work! Really... thanks, it will be very helpful.
–
CristianSep 24 '10 at 13:07

Brilliant. Worked great for me. I had to change the 8 to a 9 to specify the file name however. I also changed the drawable folder path slightly since the app in question uses extra folders for pixel density and orientation.
–
bhekmanJul 10 '12 at 21:18

2

Works great! Though I had to replace sed 's/\..\+//g' with cut -d \. -f1 - the former was returning full filename, with extension (.png or .9.png). That's on Mac with zsh
–
mindehMay 10 '13 at 8:51

UPDATE 14.12.2011: Now you can find unused resources and many more as simple as possible. Update to ADT 16 and use Android Lint. It is really amazing tool. It can find all unused resources (not only strings) and many more. From its official site: