This file is set in every Android program and is located in the root directory of the entire project, describing the components exposed in the package (Activity,service ...), the respective implementation classes, the various data that can be processed, and the location of the boot.
In addition to being able to declare four components, programmers often need to set important user permissions.
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <!-- 3 Package: Represents the name of the application4 Android:versioncode or Android:versionname: Indicates that the project generated the APK version number, initially 1. When the APK has been updated,5 This version number can be modified to prompt the user to update6 android:installlocation= "Auto": Automatically find the installation location of the APK (mobile ROM or sdcard), or "preferexternal" will be considered on the SDcard first7 -8 <Manifestxmlns:android= "Http://schemas.android.com/apk/res/android"9 Package= "Com.study"Ten Android:versioncode= "1" One Android:versionname= "1.0"> A - <USES-SDK - android:minsdkversion= "+" the android:targetsdkversion= "+" /> - - <Application - Android:allowbackup= "true" + Android:icon= "@drawable/ic_launcher" - Android:label= "@string/app_name" + Android:theme= "@style/apptheme" > A <!-- at android:icon= "@drawable/ic_launcher": Take the R.drawable.ic_launcher as the address, taken from the drawable picture, as the icon - android:label= "@string/app_name": Using R.string.app_name as the address, taken from the app_name of Strings.xml, as the application name - - - - <Activity - Android:name=". Mainactivity " in Android:label= "@string/app_name" > - <!-- to android:name= ". Mainactivity ": Represents the entire project's main program (Mainacitivity.java), which is represented under the current package + android:label= "@string/app_name": Using R.string.app_name as the address, taken from the app_name of Strings.xml, as the application name - - the <Intent-filter> * <ActionAndroid:name= "Android.intent.action.MAIN" /> $ Panax Notoginseng <categoryAndroid:name= "Android.intent.category.LAUNCHER" /> - </Intent-filter> the <!-- + Intent-filter: A very important tag (intent filter) to filter some of the user's actions and actions A Android.intent.action.MAIN: Indicates that the current program is the entrance to the entire project the - + </Activity> - </Application> $ <!-- $ There is also one of the most important uses-permission tags for setting network access permissions and more . - - - </Manifest>
The newly created component must declare its android:name in this file to be used, and the generic name is the Java file name under the package. e.g., android:name= ". Otheractivity "
Androidmanifest.xml Introduction