Remove unused variable declarations automatically - Android Studio/Inteiij

后端 未结 2 1509
悲哀的现实
悲哀的现实 2021-01-17 11:53

Is there a way to remove all unused field declarations automatically in Android Studio/Intellij ?

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-17 12:01

    Select Analyze > Run Inspection by Name..., type unused declaration and confirm with Enter. When the search is finished, select Unused declaration from the result tab, right click and select Safe delete:

    enter image description here

提交回复
热议问题