Which Android SDK should I use now?

I plan to try to launch the game in the Android Play Store in the near future, and I was wondering which SDK should I use now? I know 4.1 is for Jellybean, but should I continue to use an older version like 2.2 or 2.3?

+5
source share
9 answers

You should at least aim at API level 10, which currently has about 60% share: http://developer.android.com/about/dashboards/index.html

You can use the support library (v4) to get new classes, such as fragments.

+6
source

, Google Play, : Android Dashboard

( 2014 ) :

Android Usage 13th.  of September 2014

, Bean (Android 4.1 +).

+7

, 2.1 2.3, , . , , ICS JellyBean .

, .

, JB, , JB, , , .

( 2.3.3)

+1

, SDK, . 2.2. Google Android SDK

+1

, . . .

+1

, , , 2.1-2.2, , min SDK. sdk 16 ( # io2012). , .

+1

2.2 , , , 95% . Eclipse, , Android, Google , : http://developer.android.com/about/dashboards/index.html

0

4.1 use-sdk android: minSdkVersion = "8" android: maxSdkVersion = "16".

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

minSdkVersion , API.

targetSdkVersion This is the highest possible SDK with which you can test, devices using your application will look and feel at home when this TargetSdk is high enough to allow.

multi-versions If you want to use a function of a higher level than your minSdkVersion. you can block calls with Build.Version.X, for example.

    File path;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {
        path = new           File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath() + File.separator + directory);
    } else {
        path = new File(getBestCacheDir(applicationContext, true) + File.separator + "Pictures" + File.separator + directory);
    }

Be careful not to use API functions of a higher level than your minSDK, as this will lead to a crash at runtime.

0
source

All Articles