[英]AndroidManifest.xml <manifest> package attribute has no namespace
From the O'Reilly book "Android Application Development " by Rick Rogers, John Lombardo, Zigurd Mednieks & Blake Meike, page 44: 来自Rick Rogers的O'Reilly着作“Android应用程序开发”,John Lombardo,Zigurd Mednieks和Blake Meike,第44页:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microjobsinc.mjandroid" android:versionCode="1"
android:versionName="1.0">
The XML code above has the package
attribute. 上面的XML代码具有
package
属性。 However, in the rest of the XML, the remaining attributes all have a namespace. 但是,在XML的其余部分中,其余属性都具有命名空间。
Why do all of the attributes have a namespace except package
? 为什么除了
package
之外,所有属性都有一个命名空间?
I think it may be because the package attribute is the full Java package name for the application and so is a Java concept not something specific to Android. 我认为这可能是因为package属性是应用程序的完整Java包名称,所以Java概念不是特定于Android的东西。 It does stick out as unusual though but it is the correct way according to http://d.android.com/guide/topics/manifest/manifest-element.html
虽然它确实很突出,但根据http://d.android.com/guide/topics/manifest/manifest-element.html这是正确的方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.