Reputation: 337
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?
Upvotes: -1
Views: 1311
Reputation: 33904
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.
Upvotes: 0
Reputation: 4630
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
Upvotes: 1
Reputation: 58497
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).
Upvotes: 1