AndroidManifest. xml is a required file in every Android program. It is located in the root directory of the entire project and describes components in the package, such as Activities, Services, Content Providers, and Intent Receivers, and their respective implementation classes, various data that can be processed and startup locations.
The source code is as follows:
AndroidManifest. xml source code
1 <manifest xmlns: android = "http://schemas.android.com/apk/res/android"
2 package = "com. example. androidlifedemo"
3 android: versionCode = "1"
4 android: versionName = "1.0" type = "codeph" text = "/codeph">
5
6 <uses-sdk
7 android: minSdkVersion = "8"
8 android: targetSdkVersion = "15"/>
9
10 <application
11 android: icon = "@ drawable/ic_launcher"
12 android: label = "@ string/app_name"
13 android: theme = "@ style/AppTheme">
14 <activity
15 android: name = ". MainActivity"
16 android: label = "@ string/title_activity_main">
17 <intent-filter>
18 <action android: name = "android. intent. action. MAIN"/>
19
20 <category android: name = "android. intent. category. LAUNCHER"/>
21 </intent-filter>
22 </activity>
23 </application>
24
25 </manifest>
Package = "com. example. androidlifedemo" in line 1 indicates the main package name of the entire java application. androidlifedemo indicates the name of the project I created.
The android: versionCode in line 2 indicates the apk version generated by the project.
Android: versionName in line 1 indicates the name of the apk version generated by the project.
Lines 6th to 8th indicate the SDK version used by the project.
Android: icon = "@ drawable/ic_launcher on Line 1 represents the LOGO image of the application.
The android: label = "@ string/app_name" in line 12th indicates the name of the application.
The android: name = ". MainActivity" in line 15th indicates the name of the main program of the entire application.
The <intent-filter> of the 17th rows is an intent filter used to filter out users' actions and operations.
<Action android: name = "android. intent. action. MAIN"/> In line 3 specifies the project's portal program.
<Category android: name = "android. intent. category. LAUNCHER"/> In line 3 determines whether an application is displayed in the program list.