Because the project needs to be modified, it is easy to modify the application package name that has been developed, but if you do not find the doorway, you may waste a lot of time.
Modify the package name there are three places to change, the changes in these three places must be in order, otherwise you may encounter a lot of unnecessary trouble.
1. Modifying the manifest file
2. Re-import the R file in the Java file
1 after the system will be error, this is because the R file is not found, this time to re-import the R file in each Java file
3. Modify the package name of the Java file
After performing step 2, this time the program is ready to run, but for the sake of specification, we have to modify the package name as well.
Click on the package when modifying, press Ctrl+alt+r, rename, select the first two items, click OK.
4. After modifying the package name to modify the layout file, etc., some layout file refers to the class, this time you need to modify
5. Finally clean the project, all OK
Remember:
Be sure to follow the above order, or you may encounter many unexpected errors, such as the R file can not find a variety of headache problems, I also tried many methods on the web after the final summary of their own.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. If there is a wrong place, I would appreciate it if I could criticize it.
Modify the Android App package name