【Android 复习】:AndroidManifest.xml 文件详解

复制代码
<?xml version="1.0" encoding="utf-8"?>
    <!--
    package 包表示整个Android应用程序的主要包名,而且是一个默认的名称
    android:versionCode="1"    表示该工程所生成的apk版本号,1开始2、3、4不断的升级,以此来提示用户去不断升级
    android:versionName="1.0"  表示版本的一个名称,通常是以 1.0开始的。
    
    安装在手机中,如果应用程序比较大的话,建议选择auto,如果是比较大型的应用程序,比如游戏等,建议使用preferExternal属性,安装在外部存储器中
    android:installLocation="auto"    自动寻找应用程序安装位置,ROM或者SDcard卡,默认的属性
    android:installLocation="internalOnly" 仅仅只能安装在ROM中
    android:installLocation="preferExternal" 仅仅只能安装在SDcard中
    -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.hello"
    android:versionCode="1"
    android:versionName="1.0"
    android:installLocation="auto" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <!--
            android:name="com.android.hello.Hello" 或者是 android:name=".Hello" 表示与 package包名[package="com.android.hello"]底下的应用程序
            intent-filter 意图过滤器:用来过滤用户的一些动作和操作
            android.intent.action.MAIN : 表示当前的程序是整个工程的入口程序
            android.intent.category.LAUNCHER : 表示决定应用程序是否在程序列表中显示
        -->
        <activity
            android:name="com.android.hello.Hello"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
复制代码

 

 

本文转自:http://blog.csdn.net/ahuier/article/details/8952991

posted @   似水流云  阅读(266)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
点击右上角即可分享
微信分享提示