How can I make sure my Android Application will run in lower and higher versions?

后端 未结 3 1182
-上瘾入骨i
-上瘾入骨i 2021-01-23 09:29

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?

相关标签:
3条回答
  • 2021-01-23 09:53

    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

    0 讨论(0)
  • 2021-01-23 09:58

    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.

    0 讨论(0)
  • 2021-01-23 09:59
    <uses-sdk android:minSdkVersion="integer" 
          android:targetSdkVersion="integer"
          android:maxSdkVersion="integer" /> 
    

    In your manifest file. Check this for more information

    0 讨论(0)
提交回复
热议问题