Reputation: 6517
I want to rename my Android project's package name. Under src/
folder refactoring of packages successful but if want to rename package under gen/
folder I can't do it. Because there is R.java
file there. It is recreating automatically itself. If I disable this issue from Project -> Build Automaticall
option then I see new problems with other java files.
Shortly
How can I rename my package name in Eclipse correctly and without error?
Upvotes: 1
Views: 2375
Reputation: 1449
Please follow the steps given below to rename packages in the gen folder.
Right click on the package under gen folder
Select Refactor
Select Rename
Now change your package name as you wish
Make sure you check the following options when you rename
Upvotes: 0
Reputation: 6517
Problem has solved. This is stupid Eclipse issue. Sometimes it could not understand changes. I restarted Eclipse, clenead project then everything is ok.
Upvotes: 1
Reputation: 6463
Right click on the project -> Android Tools -> Rename Application Package.
You can also change the package name on the manifest and rebuild the project.
Upvotes: 4
Reputation:
Depends really on how you set up things.
The correct way to rename would be to allow eclipse do manually update all the package references:
Try:
Right-hand click on resource > Refactor > Rename
Upvotes: 2