Android-<manifest>

本文深入解析AndroidManifest.xml文件的基本结构与关键属性,包括命名空间、包名、安装位置选择等,同时阐述了其在Android应用开发中的重要角色与作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

语法:

<manifestxmlns: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>

必须包含:

<application>

可以包含:

<instrumentation>

<permission>

<permission-group>

<permission-tree>

<uses-configuration>

<uses-permission>

<uses-sdk>

描述:

The root element of the AndroidManifest.xml file.  It must  contain an <application> element  and specify xlmns:android and package attributes.

AndroidManifest.xml文件的根元素。它必须包含一个<application>元素,并指定xlmns : Android和包属性。
属性:
 xmlns:android
定义了Android命名空间。此属性应始终设置“ http://schemas.android.com/apk/res/android ” 。
package
一个完整的Java应用程序包名称。的名称应该是唯一的。该名称可以包含大写或小写字母(' A'到' Z“ ) ,数字,下划线( ”_“) 。然而,个别包名称部分可能只用字母开始。例如,由谷歌发布的应用程序可以有形式com.google.app.application_name名称。
包的名称作为一个应用程序的唯一标识符。这也是应用过程中的默认名称(参考<application>元素的进程的process属性)和类同(参考<activity>元素的taskAffinity的属性)一个活动的默认任务。

转载于:https://www.cnblogs.com/chris-cm/archive/2012/05/02/2478632.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值