How do I rename the android package name? [duplicate] How do I rename the android package name? [duplicate] android android

How do I rename the android package name? [duplicate]


You can do this:

  1. Change the package name manually in the manifest file.
  2. Click on your 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:

  • Set the cursor on "foocomp"
  • Press Shift+F6
  • Rename Package to whatever you want
  • Repeat for "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...

enter image description here

In Android Studio:open the build.gradle file > rename the applicationId under defaultConfig > synchronize