How to change package name of Android Project in Eclipse?


Question

I have an Android project created in Eclipse. I want to modify the package name and application of the project. How do I do that in Eclipse?

1
132
2/6/2015 5:07:58 AM

Accepted Answer

As usual, by pressing F2 on the package name, you can rename or change the package name, and also by right-clicking and then select Rename option, you can change or rename the package name.

When you press F2, it will show you the dialog box as:

Alt text

In this dialog, don't forget to check the "Update references" checkbox because by making "check" to this check-box, it will make changes to all the references of the package which are referred by other components of project.

129
11/24/2014 6:24:37 PM

This is a bug in the Eclipse Android tools.

To fix: Right click on the project, go to Android tools -> Rename application package.

And also check AndroidManifest.xml if it updated correctly. In my case it didn't, and that should solve this problem.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon