You can do this:
R.java
class and the press F6 (Refactor->Move...). It will allow you to move the class to another package, and all references to that class will be updated.The best way to solve this is going to the AndroidManifest.xml: package="com.foocomp.fooapp
:
Works for me.
Also, replace in Path in Whole Project as it didn't change everything. Then Clean, Rebuild and it works --> In Android Studio / IntelliJ you should unmark "Compact Empty Middle Packages"
Eclipse: Right click on the project > Android tools > Rename application package.
As simple as that...
In Android Studio: open the build.gradle file > rename the applicationId under defaultConfig > synchronize
shift+F6
you will get a popup window as shown below select
Rename package.That's it done.
I found another solution for renaming a package in the entire project:
This renames the package/directory throughout the entire project.
Deselect Hide Empty Middle Packages in Project Explorer Windows settings menu than you will be able to refactor each directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With