在Android的APP中必不可少的就是AndroidManifest文件:

词法:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"          package="string"          android:sharedUserId="string"          android:sharedUserLabel="string resource"           android:versionCode="integer"          android:versionName="string"          android:installLocation=["auto" | "internalOnly" | "preferExternal"] >    . . .</manifest>


<manifest>是最大的元素,因此


包含于:

none 没有

必须包含的

<application>

可以包含的元素:

<compatible-screens>
<instrumentation>
<permission>
<permission-group>
<permission-tree>
<supports-gl-texture><supports-screens>
<uses-configuration>
<uses-feature>
<uses-permission>
<uses-sdk>

描述:

在AndroidManifest.xml文件中必须包含的元素是<application>特定的xmlns:androidpackage 属性。

属性:

xmlns:android

定义了Android的名字空间,它的属性总是设置成:"http://schemas.android.com/apk/res/android".

package

和Java中的包名是一样的。这个名字应该是唯一的。这个名字可能包含大小写字母,数字以及下划线。但是一般单独的包值包含字母。


为了避免和其他开发者产生冲突,使用的包的名字应该使用你的互联网域名的所有权(反过来也是一样的).例如,由google发布的APP使用的是com.google

当你准备发布一个APP的时候你不应该使用com.example


包名会作为唯一的应用程序的标识。对于应用程序默认的名字(参看<application>元素的process属性)以及同类Activity

(参看<activity>元素taskAffinity的属性)的名字有默认的名字给它们。


注意:一旦你发布了你的应用程序,你变不可以修改你的包名。这个包名会作为应用程序的唯一标示,所以你一旦更改它,就被认为是不同的应用程序先前的版本就不能得到更新。










更多相关文章

  1. ImageView android:scaleType属性详解
  2. 转:listview android:cacheColorHint,android:listSelector属性作
  3. Android LinearLayout属性
  4. Android高手进阶教程(四)之----Android 中自定义属性(attr.xml,T
  5. Android 众多的布局属性详解[转]
  6. android xml界面布局常用属性概括
  7. 在程序中设置android:gravity 和 android:layout_Gravity属性 .

随机推荐

  1. android点击状态分析
  2. Android(安卓)Studio使用问题解决
  3. Android(安卓)版本分布数据:Android(安卓)
  4. Android(安卓)UI LinearLayout权限级别与
  5. android中@+id 与@string的使用
  6. Android(安卓)Studio 提示错误:No IDEA an
  7. Android中蓝牙使用步骤小结
  8. android 设置Button或者ImageButton的背
  9. Android(安卓)-很全的android操作内容丰
  10. 调用android手机微博客户端发送微博