Remove unused variable declarations automatically - Android Studio/Inteiij

后端 未结 2 1520
悲哀的现实
悲哀的现实 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:00

    As simple as that, just press ctrl+alt+shift+I and type unused declaration. You can also use this in removing other unused resouces, for example press ctrl+alt+shift+I and type unused resources. When the search is finished, select Unused declaration from the result tab, right click and select Safe delete

提交回复
热议问题