简体   繁体   中英

Android. How correct to set Build Target for application and Min SDK version?

I want to use in my application classes from API Level 11. Which in this case I define value of Build Target? How are related Build Target of application and the minimum version of SDK? I would be very grateful for the help!

Build Target is used to choose the android.jar of the platform version which will be used to compile the code.

minSdkVersion is defined in the manifest file and used by Android Market to filter out apps, it has nothing to do with the compile time or runtime behaviour

You can set the minimum sdk value of your project inthe Android manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="tfe.rma.ciss.be"
      android:versionCode="1"
      android:versionName="1.0">
      <uses-sdk android:minSdkVersion="8" />
      </manifest>

and if you want to specify a specific emulator or phone which will compile the code (in this case, the build target you are asking about) , go to

  1. right click on your project
  2. choose, click on properties
  3. choose Android
  4. choose the api of the emulator

Greetings !

NB: Bear in mind that your built target must have a greater or at least the same value than your minSDK version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM