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?
What should be the Target SDK when publishing an Android app?
1.3k Views Asked by Sunil kumar AtThere are 3 best solutions below

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

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.
The purpose of
targetSdkVersion
is explained in the developer documentation for <uses-sdk>: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).