Renaming the package that R.java is generated in

Bex picture Bex · Mar 30, 2011 · Viewed 28.9k times · Source

I am using eclipse and I created a test android project and the package in the "gen" folder that contains R.java is currently called com.something.test (I thought I was just testing but build my whole app on it!)

This is referenced when loading the app and the phone sometimes displays it so I need to rename it. I tried this by clicking refactor but it regenerated it again with the old name!

Can I rename it?

Answer

Cristian picture Cristian · Mar 30, 2011

Right click your project, then Android Tools -> Rename Application Name:

enter image description here

Or, if you want to do it manually, go to your manifest file, change the package name, and make a Project Clean.