Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: How can I see which resources are not used?

Is there a way in Android Studio to see unused resources?

For example, I have a large list of drawables, say icons, and I want to know if there are any that are not used in my app so that I can delete them. Is there a way to see that?

I'm on Mac.

like image 852
Terry Avatar asked Oct 19 '22 10:10

Terry


2 Answers

Try this in command line:

lint --check UnusedResources <project_directory>
like image 70
klimat Avatar answered Oct 21 '22 23:10

klimat


I found these two tools useful

  • Android Lint
  • Gradle Resource shrink
like image 24
Santosh Joshi Avatar answered Oct 22 '22 00:10

Santosh Joshi