How do you rename packages in the new IDE Android Studio, based on IntelliJ IDEA?
Is there an automatic refactoring included?
I want to make bulk refactorin
I have seen the top voted answers but i found is a little bit different to do this, i try to do the most complete tutorial.
From the Android Studio click over the gear icon ( ) and then select the option: "Compact Empty Middle Packages"
, to see the folders separated in a tree view.
Now select the folder, click right button to open the contextual menu, select Refactor
and then Rename
You will be advised to refactor the package:
Then a window will show the coincidences inside the proyect, select "Do Refactor"
:
We don´t have to change manually the AndroidManifest.xml or build.gradle files, Refactoring the package will do the job!.