Minimum Required SDK – Target SDK – Compile With

Target SDK and Compile With.

It is often confusing for Android developers on What to select for the Minimum Required SDK, Target SDK and Compile With options. To help and clear the air, I have decided to write a post on it.

Minimum Required SDK

  1. It is the lowest version of Android version that your app going to support and it is usually indicated by the API level.
  2. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set.
  3. If any feature of your app is possible only on newer versions of Android and it’s not critical to the app’s core feature set, you can enable the feature only when running on the versions that support it.
  4. The Google play will prevent the user from installing the application if the system’s API Level is lower than the value specified for Minimum Required SDK.
Here is the current statistics of Android OS versions distribution:
Android OS Versions Distribution
Decide what lowest version of Android platform your application will support based on the statistical information given above. Froyo is no more as the percentage of devices running Froyo is least compared to other Versions so it is wise idea to develop application that supports from Gingerbread (API 10).

Target SDK

  1. It indicates the highest version of Android (also using the API level) with which you have tested with your application.
  2. As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.
  3. It informs the system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app’s forward-compatibility with the target version. The application is still able to run on older versions (down to minSdkVersion).                                                                                                            Tip:Choose highest platform version so that your application will be supported in as many devices as possible and also there would be no need to use third party libraries to bring in additional UI controls (For Ex: Action Bar) since the feature will be bundled in latest versions. Developers stopped using Action Bar Sherlock as it is supported by latest version of Android.

Compile With

  1. It is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don’t have such a version available, you must install one using the SDK Manager).
  2. You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices

Comments

Popular posts from this blog

Styling Bottom Navigation

Lottie Animation in Android

Set Up the AWS Mobile SDK for Android