Recently I read a book about android which says that Starting with august 2019, Google play will only accept apps built using Api 26 or newer
. But recently we published android app that has minimum Api level 23 and it is successfully published. Can anyone tell whats the scenario, or the documentation in the book is wrong?

- 37,901
- 21
- 84
- 115

- 1
- 5
- 23
- 51
3 Answers
They are not talking about minSdk
, they are talking about targetSdk or compileSdk.
Notice that I used "or" because your targetSdk
can not be higher than your compileSdk
.
When you increment targetSdk number, you have to comply with the new api and rules enforced however using an old compile/target sdk will let you use the features in the same way as they worked in earlier versions (which is one of the root causes of security vulnerablities). That is why they placed the restriction so every app is forced to use 'new way of doing things' rather than old.
For example, Before Android 5.0, permissions were granted when app was installed but then it was changed so now you have to ask permissions on runtime. If you target Sdk api lower than Android 5.0, you don't have to do anything and it will work on newer devices as well. However, if you target api higher than Android 5, you must ask for permissions on runtime or the newer sdk code throws an exception.

- 3,482
- 2
- 11
- 29
What this means is that your target API has to be their minimum (in this case 28), but you can still set your own minimum API to whatever you want to allow backwards compatibility.
When you upload an APK, it needs to meet Google Play’s target API level requirements. Starting August 1, 2019, Google Play requires that new apps target at least Android 9.0 (API level 28), and that app updates target Android 9.0 from November 1, 2019. Until these dates, new apps and app updates must target at least Android 8.0 (API level 26).
https://developer.android.com/distribute/best-practices/develop/target-sdk
I have an app that targets 28, but the min API level I want is 18. It still allows me to upload the app because it targets 28.

- 2,173
- 1
- 13
- 27
It means that you have to set in the build.gradle file
targetSdkVersion 28 //or later
When you upload an APK, it needs to meet Google Play’s target API level requirements. Starting August 1, 2019, Google Play requires that new apps target at least Android 9.0 (API level 28), and that app updates target Android 9.0 from November 1, 2019. Until these dates, new apps and app updates must target at least Android 8.0 (API level 26).
Keep in mind that:
minSdkVersion <= targetSdkVersion <= compileSdkVersion
If you want to have more details about minSdk, targetSdk and compileSdk I suggest you reading this blog.

- 320,139
- 94
- 887
- 841