Xamarin 简明教程

Xamarin - Application Manifest

所有 Android 应用都有一个 manifest file ,通常称为 AndroidManifest.xml 。清单文件包含 Android 平台为成功运行应用所需的一切内容。

All Android Apps have a manifest file commonly referred to as AndroidManifest.xml. The manifest file contains everything about the Android platform that an App needs in order to run successfully.

在此,我们列出了清单文件的部分重要功能 -

Here, we have listed down some of the important functions of a manifest file −

  1. It declares the minimum API level required by the application.

  2. It declares the permissions required by the application, e.g., camera, location, etc.

  3. It gives permissions to hardware and software features used or required by the application.

  4. It lists the libraries that the application must be linked.

以下截图显示了一个清单文件。

The following screenshot shows a Manifest file.

andriod manifest

Application name - 它指您应用的标题

Application name − It refers to the title of your App

Package name - 它是用于识别您的应用的唯一名称。

Package name − It is an unique name used to identify your App.

Application Icon - 它是针对您的应用显示在 Android 主屏幕上的图标。

Application Icon − It is the icon displayed on the Android home screen for your App.

Version Number - 它是一个用于显示您应用的一个版本比另一个版本更新的单一数字。

Version Number − It is a single number that is used to show one version of your App is more recent than another.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   android:versionCode="1" >

Version Name - 它针对您的应用的用户友好型版本字符串,用户将通过您的应用设置和 Google Play 商店查看该字符串。以下代码显示了一个版本名称示例。

Version Name − It is a user-friendly version string for your App that users will see on your App settings and on the Google PlayStore. The following code shows an example of a version name.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   android:versionName="1.0.0">

Minimum Android Version - 它是您的应用程序所支持的最低 Android 版本平台。

Minimum Android Version − It is the lowest Android version platform which your application supports.

<uses-sdk android:minSdkVersion="16" />

在上例中,我们的最低 Android 版本是 API 级别 16,通常称为 JELLY BEAN

In the above example, our minimum Android version is API Level 16, commonly referred to as JELLY BEAN.

Target Android Version - 它针对您的应用进行编译的 Android 版本。

Target Android Version − It is the Android version on which your App is compiled against.