First you understand what is Java package nomenclature?
Sometimes your android project needs to be renamed Because a file was copied manually into the project or Google play Market have already that package name Application.the application name has changed during development, and it needs to be reflected within the filesystem tree. Automatic tools help with this and ensure cross-references are automatically updated. as an example, within the Eclipse IDE, the different ways that to rename parts of an application are
Rename/Change the android project, as follows:
1. Right-click the project and Refactor ➪ Move to a new directory in the filesystem.
2. Right-click the project and Refactor ➪ Rename the project.
Project name changed now change java package name
Rename an android package, as follows:
1. Right-click the package and Refactor ➪ Rename the package.
2. popup open in eclipse (Rename Package)…. Edit package name and Check Update References ….Click Ok
- Open AndroidMainfest.xml ➪ Mainfest (Tab)
- click Browse ➪ new window open ➪ select new package ➪ click ok
Then save project …Package name changed
Rename an android class (such as the major components Activity, Service, BroadcastReceiver, ContentProvider), as follows:
Right-click the .java file and Refactor ➪ Rename the class.
➪➪➪ Edit the AndroidManifest.xml to make sure the android:name has the new component name.