How can I find all unused methods and variables of my project in the Android Studio IDE?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
You can also install the
QAPlug via File -> Settings -> Plugins -> Browse Repositories -> QAPlug
.For Mac:
In QAPlug is PMD, FindBugs, Checkstyle and Hammurapi integrated. These tools are very nice to find dead code, bugs, increase performance and make the code more readable. I highly recommend those tools if you work for a bigger project.
In the android studio(or more generally in the Intellij IDEA) you can specify inspection code that you want to analyze from
Analyze->Inspect Code...
and then define the scope of your code. You can see the result for my code in the below picture:In
Declaration redundancy
you can see that "someMethod" is declared unused. Also, inProbable bugs
you can find variablei
is never used.