Android 2.2 or 4.1?

When creating my new application, should I create against 2.2 or 4.1? I know that 2.2 has 83% of the market right now, but can I build against 4.1 and make min sdk android 2.0?

+4
source share
3 answers

Set the minimum, maximum and target SDK in AndroidManifest.xml, for example:

<uses-sdk android:maxSdkVersion="16" android:minSdkVersion="8" android:targetSdkVersion="16" /> 
+3
source

The goal of your build should always be the latest platform (e.g. Jelly Bean API 16). Properties-> Android-> Build Target

In your manifest, you should define something like:

  <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /> 

Lint will tell you if your code uses something inaccessible in previous versions. You can test your code on any emulator to ensure the correct functionality.

+3
source

Yes, you can do this, but there are some features that are not available in previous versions of Android. Before using them, be sure to check the OS version, for example:

 if (Build.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD) { // only for android older than gingerbread } 
0
source

All Articles