Take the 2-minute tour ×

When you want to create project through wizard, it asks you enter Project Build Target. Assume that

  1. I want my application to support Android 2.1 and above,
  2. My test devices are a hand phone with Android 2.3.3 and a tablet 7" with Android 3.2.
  • Is it mandatory to choose "Android 2.1 (API level 7)" in Project build target?
  • May I set Project Build Target to "Android 4.0.3 (API level 15)"


<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Yes, the project build target SDK version may be higher (but not lower obviously) than the minimum SDK version specified in the Manifest. Just make sure to avoid calling APIs that came in with higher SDK versions than the minimum you specified.

share|improve this answer
Thanks, so there is no advantage over setting build target more than minimum SDK version? Therefore its better to set build target as same as minimum SDK version to prevent using using new APIs. Am i right? –  Hesam Apr 29 '12 at 9:28
Yes there is advantage, because newer device with higher API level might have improved version of the features of the API and they will not use them if you don't enable their API level through the targetSdkVersion (see my answer for link to details) –  JScoobyCed Apr 29 '12 at 9:30
ok, got it. Thanks again dear Zsombor Erdődy-Nagy. –  Hesam Apr 29 '12 at 9:36
add comment

Yes you can. The targetSdkVersion helps the device with higher API level to use the newest (optimized) version of the implementation rather than the default implementation of the minSDKVersion and prevent enabling the compatibility behaviors. Make sure you test on device running this version though.

Ref: targetSdkVersion

share|improve this answer
i found that target sdk version is the version that I'm testing on it (on a real device). so, with setting this, I'm telling Android of device that don't resize my application if your version is as same as target sdk version. –  Hesam Apr 29 '12 at 9:32
add comment

Your Answer


