Android Study Notes 02: AndroidManifest. xml source code

Source: Internet
Author: User

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.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.