1>全局篇(包名、版本信息)
1>>应用的包名以及版本信息的管理
package=""
android:versionCode=""
android:versionName=""
2>>控制android版本信息
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="21" />
2>组件篇(四大组件)
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > </application>
>>Activity组件
<activity android:name=".MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
>>Service篇
<service android:name=""> <intent-filter> <action android:name=""> </action> </intent-filter> </service>
>>Provider篇
<provider android:name=""> </provider>
>>Broadcast Receiver
<receiver android:name=""> <intent-filter> <action android:name=""/> </intent-filter> </receiver>
3>权限篇(申请权限和定义权限)
>>自带权限
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
>>自定义权限篇
<permission android:name="aaabbb" android:protectionLevel="normal"></permission> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:permission="aaabbb" android:name=".MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" 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>
时间: 2024-10-13 13:46:56