Hesam
Hesam

Reputation: 53600

Why "Remove Unused Resources" doesn't find anything in Android Studio?

As you might know, Remove Unused Resourceshas added recently to Android Studio, Android Studio 2.0 Preview 5.

I run this function by right click on the name of project then Refactor/Remove Unused Resources. It shows a dialog and nothing happens when I click Refactor or Preview buttons. I believe there must be a lot of problems since this is a very big project but I don't see result. Are you able to see any result?

Upvotes: 3

Views: 855

Answers (1)

Hesam
Hesam

Reputation: 53600

Okay, I just found what is the problem.

The problem was, as I mentioned I was right clicking on project name and did refactoring from there. So this way doesn't work (Android Studio guys must disable this functionality to not staffing people around)

So, By running Analyze/inspect code I could see a list of unused resources. I doubled clicked on an String item then String.xml opened and by doing refactoring/remove unused resources... all resources removed :+1

So it was the trick. I could see all changed files on git. Hope it helps you guys.

Upvotes: 3

Related Questions