I’ve published an update of my app in Google Play and got the warning that it is targeted to Android API level 25 and from next month it is necessary targeting Android API level 26. What have I to do? Have I to update cordova-android from 6.2.3 to >7.0.0?
Hello,
check in config.xml preference for targetSdkVersion
Typically you have only set minsdkversion like
<preference name="android-minSdkVersion" value="19" />
if no targetsdkversion is set, you do not need to change.
See more here https://pointdeveloper.com/build-ionic-2-cordova-apps-specific-platform-version/
Go in Android Studio to sdk-manager and check which sdk with witch api level is installed. Api level 26 is Oreo. Install it, if it isn’t installed. Remove lower levels. If you get problems with older apps, then you can add it later again, if nescesarry.
Best regards, anna-liebt
Hello,
I just tried what you are suggesting, but I had no luck. I changed <preference name="android-minSdkVersion" value="19">
in my config.xml but I found that the warning on the Google Play’s review summary again.
Ando con el mismo problema, acabo de cambiar en el config.xml:
<preference name=“android-minSdkVersion” value=“19” />
Y todavía no hago el BUILD para subir a producción. En cuanto lo suba a la PlayStore de Google te aviso si tuve algún problema. Espero que ya no me salga el aviso como a ti.
You need to set the android-targetSdkVersion, not the min version. I had same issue and updating target version to 26 fixed it (just left the minSdkVersion as what it was)
These are the settings in my config.xml file…
<preference name=“android-minSdkVersion” value=“16” />
<preference name=“android-targetSdkVersion” value=“26” />
Hi @turneye I tryed your suggestion but whit no success. Do you have other suggestion, no matter what I do, google play store always reject my app with API error. Thanks in advance.
Hi did any one solve this . i have same problme please help me to solve When i publish apk its say API Level 26 please upgragte 28.
Please
in config.xml
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="28" />
it works for me… try it.
After spend some time on this error i found this solution.
- Follow this step
- Update Your sdk to api level 28, in my case i update my sdk from android studio.
- Create new project with “ionic start”.
- Copy paste your old code to this new created project and install your all plugin and it’s Done!
This should be marked as the proper solution, worked perfectly for me.
It worked for me to put the following tag:
<preference name="android-targetSdkVersion" value="28" />
Thanks sir
Its worked when added android-targetSdkVersion
in config.xml. Thnak you sir
This worked for me, remove the platform and add latest platform
ionic cordova platform rm android
ionic cordova platform add android@latest
and then build.
in my case, I had to publish a test version, and google play requires api taget min 28
so using android cordova you must use the version to 9
more information about you can see at
and cordova versions for each android api target
https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html