Android <original-package> tags meaning

Source: Internet
Author: User

Differences in,<original-package> and <manifest package=...> in Androidmanifest.xml:
<ORIGINAL-PACKAGE>: Application Source Package
<manifest PACKAGE=...>: Application runtime process name, same as R.java package name
Therefore, the above two names can be different, generally do not write <original-package>, but if written, you need to pay attention to the following points:
1. If <manifest package=...> is the same as the name value of <original-package>, the Android:name property value can be used when configuring the build. ClassName "form.
2, if the name in <manifest package=...> is not the source package name, then in <activity><service><receiver><provider> The Android:name property in is required to write the full package name, ". ClassName "form is invalid. And at this point, when you reference R.java in your code, you use that name as well, see the code
<manifest xmlns:android= "Http://schemas.android.com/apk/res/android"
Package= "Com.test.process"
Android:versioncode= "1"
Android:versionname= "1.0" >

<original-package android:name= "Com.test.testapp"/>
......
From the above code, R.java in the "com.test.process" package, and the project source code package "Com.test.testapp", therefore, in the code to reference R.java, you must use the import COM.TEST.PROCESS.R;

Original reference: http://blog.csdn.net/wh_19910525/article/details/8203968

Android <original-package> tags meaning

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.