首页 > 代码库 > Androidmanifest.xml在Android项目中的作用

Androidmanifest.xml在Android项目中的作用

下面是一个项目中的AndroidManifest.xml文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="tw.suggest"                                //指定项目中的程序文件的包路径
    android:versionCode="1" //此项目的版本号码
    android:versionName="1.0" > //此项目的版本名称


    <uses-sdk
        android:minSdkVersion="1"     //此项目可运行的最低API版本
        android:targetSdkVersion="10" />//此项目期望可运行的API版本
<application
        android:allowBackup="true"//允许备份
        android:icon="@drawable/ic_launcher"//程序执行时所显示的小图标
        android:label="@string/app_name" //程序执行时显示在在手机屏幕上方的信息列中的程序名称
        android:theme="@style/AppTheme"//主题样式
        >        

<activity    //activity是Android程序运行的基本执行单元
            android:name=".MainActivity"//运行是进入此指定程序
            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>

Androidmanifest.xml在Android项目中的作用