Android項目的配置文件


第一個Android項目的配置文件AndroidManifest.xml如下,加上了自己的注解

<?xml version="1.0" encoding="utf-8"?><!--xml文件的title-->
<!--xmlns全稱xmlnamespace 必須添加這個屬性才能使用android:開頭的屬性
    package表示包名
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.myapplication01">

    <application
        android:allowBackup="true"><!--允許拷貝-->
        android:icon="@mipmap/ic_launcher"<!--在程序列表中顯示的圖標-->
        android:label="@string/app_name"<!--在程序列表中顯示的名字-->
        android:roundIcon="@mipmap/ic_launcher_round"<!---->
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <!--每一個也頁面都是一個activity 必須在此處聲明
        name屬性值一般形式為:packageName.activityName
        .表示當前包
        -->
        <activity android:name=".MainActivity">
            <intent-filter>
                <!--如果有這個標簽並且如下設置屬性值,表示這是項目的主界面 程序開始的界面-->
                <action android:name="android.intent.action.MAIN" />
                <!--添加category標簽並且如下設置,項目才會顯示在程序列表中-->
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM