Eclipse Modified APK Package name Class name for Android project

Source: Internet
Author: User

A summary of the names modified under the Eclipse integrated development environment Adt-bundle provided by Google:

1. Modify the project name (apk name)

Enter a new name in the dialog box that pops up

The operation is actually modifying the <name> node under <project>/.project. But for some reason, only to modify the file, in Adt-bundle, the project name is still the old name, but the name of the APK is changed to a new name, it is recommended to "refactor" the way to rename the project.

2. Modify the phone < desktop name >

3. Modify the installation path on the phone

A) Modify the name of the main package in the source code

Enter a new name in the dialog box that pops up

b) Modify Androidmanifest.xml <manifest package= "< new package>"

After you modify the file, click Save, and in the dialog box that pops up, tap < Yes >.

In Manifest.xml
The package property in the <manifest> tag is used to set the application's process name, which is the process name that DDMS sees at run time. At the same time is the Gen directory under the R.id, R.layout is located in the package name.
<original-package> tag is used to set the application source package name, that is, the Java file is located in the source code package hierarchy, Android Project REAL source code hierarchy.
If the package property in <manifest> is the same as the Android:name value of <original-package>, the Android:name property value can be used when configuring the build. ClassName "form.
Use the <original-package> tag after android in <activity><service><receiver><provider>: The Name property needs to write the full registration, ". ClassName "form is invalid.

Note the Package property in the:<manifest> tag simply tells the system which process name is applied, so the process name (the value of the package attribute in manifest) can be different from the value of <original-package>.

c) Modify the source code in all use <package>. R.* Place.

Switch

Eclipse modifies the APK package name Class name for Android projects

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.