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
Be sure to go to Sheharyar's great Answer. There are so many answers and comments that follow it that it would be easy to get confused and give up, but don't. That answer works.
In short, you do three things:
(1) Deselect Compact Empty Middle Packages
.
(2) Refactor
then Rename
each old directory node by choosing Change Package
(not Change Directory
) to match the new package name. (Be sure to do a preview of changes.)
(3) Edit the build.gradle
file and make APPLICATION_ID
match the new package name.