Minimum Required SDK – Target SDK – Compile With

To create a new Android Application Project in Eclipse, one has to fill in following details to proceed to next step in project creation.

  1. Application Name – Is an App name that appears to User
  2. Project Name – Is a Name of the project directory
  3. Package Name – Is an Application’s package name
  4. Minimum Required SDK – ???
  5. Target SDK – ???
  6. Compile With – ???
  7. Theme – It specifies Android UI style

We enter Application name, Project name and Package name but we usually leave default values for Minimum Required SDK, 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

Source: Platform Versions

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).

Tip:

Choose lowest platform version so that your application will be supported in as many devices as possible. Google Play will list your application in devices whose API version is greater than or equal to the Minimum Required SDK you set so choose your Minimum Required SDK accordingly.

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.

Tip:

Choose highest platform version so that your application will be optimized for great user experience on the latest devices.


If you still have any questions or need any more information on choosing SDK, please join discussion right from here.

[pglinkadssmall1]

[pgwriteforus]
[pgfeedback]

Related Articles

Author: Udhay

Share This Post On
468 ad
  • Dipak Kadam

    Hi, i am learner ..thanks for this great tute.
    I have query, can we set the target sdk & compile with sdk is same & is it mandtory?

    • It is always best practice to set Compile with to latest version of Android so that latest features available for Android can be incorporated in Application. Make sure you set Target SDK and Compile with to latest version of Android.

  • liuli

    hi,i am also a leaner.i have a question of the target sdk.you said i can take advantage of the new Version by update the target sdk.but how can i do it when i run the app in an older System.Do you mean the performance of the app is different in the older and the latest?
    i am a chinese.sorry for my poor english.

  • You need to set Minimum Required SDK to the minimum SDK version in which your App gonna run. Yes App will change its behavior according to the SDKs.

Join now to get more access to our Android Tutorials

Join now to get more access to our Android Tutorials

Once you Join, you will receive Mail containing latest Android Tutorials once a month !!

I promise I wont spam you !!

You have Successfully Subscribed!

Pin It on Pinterest

Shares