Reputation: 23
According to the new policies for submitting or update new apps to Play Store:
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
https://developer.android.com/distribute/best-practices/develop/target-sdk
We have some doubt regarding the libraries, Should we compile the library again with the last targetSDK?, or just validate that we don't have any problem with the last targetSDK for example if my library has the targetSdkVersion 23 and works fine in apps with targetSdkVersion 26, will the Play Store not reject the application?
Upvotes: 2
Views: 1761
Reputation: 13842
The Play store just looks at the target SDK of your final compiled APK. So if you can get it to compile fine, and you can confirm by testing it works then that should be fine as far as the Play store is concerned. Once a jar/aar is compiled into an APK I don't believe the Play store can know the original targetSdk
.
Upvotes: 2
Reputation: 3748
just validate that we don't have any problem with the last targetSdkVersion for example if my library have the targetSdkVersion 23
Most of the Android versions provide backward compatibility but by providing a higher targetSdkVersion
even with a lower compileSdkVersion
, the app will have better flexibility and accessibility of the latest Android API. If you follow some of the Android Release documentation, you will notice some new features offered would be remove from the latest API update. If your app have set the latest targetSdkVersion
, the Android Studio will tell you which API has been deprecated, for example, some changes to service, if your app used the implicit intent for BindService, it will throw you an exception. Therefore, it is always recommended to implement the latest targetSdkVersion.
At the moment, if I'm not mistaken, the Play Store will still accept the app with lower targetSdkVersion. But it is recommended that you recompile to the latest targetSdkVersion as Play Store would request that in some time.
I hope it answer your doubt, cheers!
Upvotes: 1