在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. Android属性之build.prop,及property_get/property_set
  2. 从零开始学android开发- layout属性介绍
  3. Android的四大天王
  4. Android(安卓)众多的布局属性详解
  5. Android(安卓)android:exported = true 用法详解
  6. ImageView android:scaleType属性详解
  7. 转:listview android:cacheColorHint,android:listSelector属性作
  8. Android(安卓)LinearLayout属性
  9. Android高手进阶教程(四)之----Android(安卓)中自定义属性(attr.

随机推荐

  1. Android(安卓)核心分析 之七------Servic
  2. Android桌面二:Android桌面widget
  3. Android常用的几个命令
  4. Android系统简介
  5. Android,百度,云知声tts总结
  6. Android权限管理
  7. Android(安卓)技术专题系列之十七 -- volum
  8. Android中shape的使用
  9. Launcher2
  10. Eclipse 不能finish android工程