I have tried this post
Remove all unused classes,methods from Android Studio project
We can find some of unused classes by the method mentioned in the post:
Analyze -> Run inspection by name...-> Unused declaration
Since our project is using Hilt framework, hilt would generate XXX_GeneratedInjector something that use the unused classes. Doing the inspection would not find the unused classes in this case. Is there any way to find unused classes in project using Hilt?