Michael
Michael

Reputation: 1164

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!

Upvotes: 2

Views: 2453

Answers (2)

youssoua
youssoua

Reputation: 802

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

Upvotes: 1

Rajdeep Dua
Rajdeep Dua

Reputation: 11230

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

Upvotes: 4

Related Questions