Android: minsdkversion

Source: Internet
Author: User

When creating an android project, you must enter minsdkversion. Generally, we specify the API level consistent with the SDK version we use. then, in androidmanifest. the XML file has a corresponding property: Android: minsdkversion. can this attribute be modified? I think it is okay, but it cannot be modified at will.

"Android: minsdkversion", whose name is "minimum SDK version", corresponds to the API level of different Android versions. For example, Android 1.5 corresponds to 3, Android 1.6 corresponds to 4, and Android 2.1 corresponds to 7, android2.2 corresponds to 8, Android 2.3.3 corresponds to 10, and so on...After you specify this value, the android system uses the SDK version corresponding to this specified value to compile your application.

So, we are in androidmanifest. if this parameter is specified in XML, it must be a value smaller or equal than the API level when we create the SDK. In this way, the android system will compile the SDK with the corresponding version during compilation. If the modified Android: minsdkversion is greater than the API level corresponding to the SDK version in our project, the android System reports an error during compilation.




1. Create an android Project (helloandroid) and specify it as Android 2.2. Enter 8 and finish for the corresponding minsdkversion;

2. Now we run helloandroid and will run a simulator of Version 2.2.

3. If we modify Android: minsdkversion = 7 in the androidmanifest. xml file and run it again, it will run on the 2.2 simulator we have enabled. Because Android APIs are backward compatible, this project is compiled using version 2.1 During system compilation, but can also be run on the 2.2 simulator; if we shut down the 2.2 simulator and run the helloandroid project, a new API level = 7 simulator will be created to run the program (that is, the 2.1 simulator ).

4. If we modify Android: minsdkversion = 10, an error will be reported whether or not you have enabled the simulator of Version 2.2:

Error: application requires API version 10. device API version is 8 (Android 2.2 ).
Launch canceled!

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: 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.