1

I am building an Android application in version 2.3.3. Will this run in lower versions and in higher versions? What do I need to do to make this happen?

1
  • Good answers here, but never specify maxSdkVersion unless you're absolutely sure it won't run on higher versions. You will tick off your users.
    – Krylez
    Oct 16, 2012 at 7:03

3 Answers 3

6

If you mention minSdkVersion and maxSdkversion in your application's AndroidManifest.xml file. It will be support to those version. For example -

<uses-sdk android:minSdkVersion="integer" 
      android:targetSdkVersion="integer"
      android:maxSdkVersion="integer" />

instead of that integer value you can set your API level that from which level of mobile version to which level of mobile version for your application supported. If you will set your minSdkVersion as 8 it will be support from 2.2 android mobile version.

And, if you've set maxSdkVersion as 16 it will be support upto 4.1 android devices.

Read this article. And, you have to take a look at support screens part for supporting your application to all the size of devices.

Hope this helps you.

4
  • Correct me if I'm wrong, but I think you still have to test in all of those versions, lest you run into some sort of buggy behavior where your code doesn't actually run as expected on one of the versions within that range. You should mention in your answer that specifying the versions alone will not guarantee everything will work as expected ;) Oct 16, 2012 at 6:46
  • What about supports-screens? Oct 16, 2012 at 6:48
  • @jmort253 Is it fine now. Sorry, i didn't notify the word higher versions Oct 16, 2012 at 6:51
  • @hotveryspicy Is it fine now. Sorry, i didn't notify the word higher versions Oct 16, 2012 at 6:52
0
<uses-sdk android:minSdkVersion="integer" 
      android:targetSdkVersion="integer"
      android:maxSdkVersion="integer" /> 

In your manifest file. Check this for more information

0

You are asking about build version in which case the highest version is always the best possible version to use. By setting it to the highest build version it will not cause any problems with lower versions. However, sdkmin and sdkmax set in AndroidManifest.xml are a different issue. Those are used by Google Play to filter out devices who are between the two ranges which would matter.

Summary : It is always best to build your application with the highest android version possible and then setting the sdkmin and sdkmax depending on what the application uses.

Take a look at this article for a more in-depth version of what I summarized.

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.