Android in Package name change item

Source: Internet
Author: User

Usually when the package name changes due to the R file error, sometimes the unexplained manifest confusing multiple text files.

So, we now feel the simplest and most convenient package name change process file, such as the following:

If the package is named Com.pepper.util, we will change the package name Com.pp.util

1. Click on the project right-click-->android tools-->rename Application Package: Change the Pack name--click ok--> click Finish:launch Configuration update--> Click Yes

2. If your package is named: Com.pepper.util, do not change the package name of the main package first. You have set up several sub-packages under this bag. For example: Com.pepper.util.print, now we first change the package name of the child package is: Com.pp.util.print. Right-click the-->refactor-->rename of the child package and the following dialog box pops up:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvc2luz2xlcgvwcgvy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">

After setting. Click preview--> to click OK.

3, the child package is changed well, open the manifest file, the manifest in the original package name Com.pepper.util, all changes to Com.pp.util. Save after changing.

4. Change the package name of the main package according to the 2nd step method.

The middle will be one step more than the 2nd step. Click Continue to go.

5, now the package has been modified. However, there may be some in the program can not be self-initiated changes in the package name may or Com.pepper.util, so we want to search the entire project. See if there is a place where the original package name exists. Now click on the entire project and press the shortcut key ctrl+h. The following screen will pop up:


Select the label above: File Search. In containing text: Enter your original package name or the original package name is different from today's package name, we search for pepper now, and then click Search. The section below eclipse will be associated with the Search tab window. This is the content of the search results, assuming that the project still exists like the original package name. It will appear here, click on the detailed display location, and then become today's package name.

After you save the changes.

6, now, has changed the entire project package name to complete it.




Android in Package name change item

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.