Modify the Android App package name

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.