I have been working on an Android project from past one year in Eclipse with API level set to 4.2 (target SDK 17). Now I want to publish it in the Play Store. Should I change the target SDK (manifest file) to the latest (i.e. 4.4) since my app works perfectly on KitKat?
3 Answers
See your app will work fine with kitkat
because the newer versions are always made to be compatible with the older android
versions,but vice versa is not true....if you develop something in higher API
level and then try to run it in older versions of android, than it may happen that your app may not work or some features may not work as expected.So,you too can add KITKAT
compatibility in your android manifest file ...cheers

- 4,544
- 3
- 34
- 72
-
Well i checked in older versions too. but my question is should targetSDK(manisfest file) should be always latest during publishing time. – Sunil kumar Jul 30 '14 at 11:58
-
2targetSDK should always be the latest. Beware, there are a couple of signature changes in some API levels that cause ambiguity so doublecheck your app when doing it. – MLProgrammer-CiM Jul 30 '14 at 12:02
-
mentioning latest API level will enable the users using **kitkat** to install your app as they can see your app in the playstore compatible with their devices....so i think its a good choice.. :) – nobalG Jul 30 '14 at 12:08
The purpose of targetSdkVersion
is explained in the developer documentation for <uses-sdk>:
This attribute 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).
As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion, the system may enable compatibility behaviors to ensure that your app continues to work the way you expect.
TL;DR: You should set targetSdkVersion
to the API level that you've primarily been developing and testing on. Google recommends that you see to it that this is the latest Android version, but that may not always be feasible (for financial and other reasons).
As per this announcement you have to make sure to use a recent target SDK (at most one or two versions older than the most recent), otherwise you cannot publish your app in the Play Store. This is enforced for new apps as of August 2018 and November 2018 for updating existing apps, requiring you to target API level 26 or newer.

- 33,559
- 24
- 104
- 119