I have developed an Android App having API 21 as target SDK version.
Will it run fine on API above it, for example, API 23?
I have developed an Android App having API 21 as target SDK version.
Will it run fine on API above it, for example, API 23?
It is perfectly ok to use a targetSdkVersion and install it on a device that has a greater SDK version.
The targetSdkVersion that you specified in your build.gradle tells the system that you have developed and tested your app to work on that SDK. If the user installs your app on a greater SDK it is the system responsibility to provide backwards compatibility (if anything has changed).
A good example is what happened with the permissions on SDK 23. Since that version it is necessary to explicitly request for dangerous permissions in code, just declaring the permission in the manifest is no longer sufficient.
However, if you target this app to SDK22, it is not required to request explicitly by code, and if you install this app on a greater SDK system, it will work, because of the backward compatibility, which in this case is to accept all the permissions at install time.
According to Uses SDK
It could also help you to know this
Your
minSdkVersion
is certainly below theAPI 21
. So, your application does work on above SDK versions (including theAPI 23
).You're good with that, no worries :)
PS: Check this link targetSDKVersion to learn more about target SDK use purpose.