自动删除未使用的变量声明 - Android Studio/Inteiij

Viv*_*tra 11 android-studio

有没有办法在Android Studio/Intellij中自动删除所有未使用的字段声明?

Dar*_*Kay 19

选择Analyze > Run Inspection by Name...,输入unused declaration并确认Enter.搜索完成后,Unused declaration从结果选项卡中选择,右键单击并选择Safe delete:

在此输入图像描述