Androidmanifest. XML (1)-translated from beginning Android games

Source: Internet
Author: User
Tags android games

There are too few excellent Chinese books on Android game development, and there are indeed many English books.

 

There is no way to learn English. I don't know where to use translation tools!

 

In order to improve my English proficiency and memory intensity, I sent some useful pieces in the book to the top.

 

The following is a simple example:

<Manifest> element of androidmanifest. xml

The <manifest> label is the root node of androidmanifest. xml. There is a basic example:

<Manifest xmlns: Android ="Http://schemas.android.com/apk/res/android"
Package = "com. helloworld"
Android: versioncode = "1"
Android: versionname = "1.0"
Android: installlocation = "preferexternal">
...
</Manifest>

You may have used XML before and may be familiar with the first line. The <manifest> tag specifies an android namespace that we can see in other manifest files.

The package attribute defines the root package in our application. In the future, we will create various types in the packages corresponding to this package name.

 

The versioncode and versionname attributes specify two forms of our application version.

Versioncode is an integer. We must add 1 to each updated version so that the Android Market can track the application version.

Versionname is a visible version number and can be any string (for example, 1.0, 2. 0 ...)

 

The installlocation attribute is used to determine the installation path of an application on the SD card (only available in Android and later versions). If possible, install andorid2.2 and later applications on the internal storage device.

 

All element attributes in manifest are usually prefixed with Android.

 

The <manifest> element defines the application components, permissions, hardware configurations, and supported Android versions.

 

The following element is <Application>. Come here today ~

Attached Original:

The <manifest> element
The <manifest> tag is the root element of an androidmanifest. xml file. Here's a basic
Example:
<Manifest xmlns: Android ="Http://schemas.android.com/apk/res/android"
Package = "com. helloworld"
Android: versioncode = "1"
Android: versionname = "1.0"
Android: installlocation = "preferexternal">
...
</Manifest>

Assuming you have worked with XML before, you shoshould be familiar with the first line.
The <manifest> tag specifies a namespace called Android, which is used throughout
Rest of the manifest file. The package attribute defines the root package name of our
Application. Later on, we'll reference specific classes of our application relative to this
Package name.

The versioncode and versionname attributes specify the version of our application in two
Forms. The versioncode is an integer We Have To increment each time we publish a new
Version of our application. It is used by the Android Market to track our application's
Version. The versionname is displayed to users of the Android Market when they
Browses our application. We can use any string we like here.

 
The installlocation attribute is only available to us if we set the build target of our
Android project in eclipse to Android 2.2 or newer. It specifies where our application
Shocould be installed. The string preferexternal tells the system that we 'd like our
Application to be installed to the SD card. This will only work on Android 2.2 or newer,
And is ignored by all earlier Android applications. On Android 2.2 or newer
Application will always get installed to the internal storage if possible.

All attributes of the XML elements in a manifest file are generally prefixed with
Android namespace, as shown previusly. For brefill, I will not specify the namespace
In the following sections when talking about a specific attribute.
Inside the <manifest> element, we then define the application's components,
Permissions, hardware profiles, and supported Android versions.

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.