Ionic cordova playstore minimum targetSdk error

on

Your app currently targets API level 29 and must target at least API level 31 to ensure that it is built on the latest APIs optimised for security and performance. Change your app’s target API level to at least 31. Learn more

I got the above error in android place store when I tried to upload ionic cordova build into google playstore

This message indicates that your Ionic app currently targets API level 29, which is outdated, and Google Play Store requires apps to target at least API level 31 to ensure the latest security and performance optimizations are applied.

To update your app’s target API level, you need to modify the android-targetSdkVersion property in the config.xml file of your Ionic app.

  1. Open the config.xml file in your project’s root directory.
  2. Locate the <platform name="android"> section and find the android-targetSdkVersion property.
  3. Change the value of the android-targetSdkVersion property to “31” or higher.
  4. Save the changes to the config.xml file.
<code class="">&lt;preference name="targetSdkVersion" value="31" /></code>

After making these changes, rebuild your app using the following command:

<code class="">ionic cordova build android --prod --release</code>

This will generate a new APK that targets API level 31, which can be uploaded to the Google Play Store.

Your app currently targets API level 30 and must target at least API level 31 to ensure that it is built on the latest APIs optimised for security and performance. Change your app’s target API level to at least 31

<code class="">ionic cordova platform remove android
ionic cordova platform add android@11</code>
Posted in Android, Ionic and tagged , by .

About Gowri

I am professional web developer with 8+ years experience. PHP, jQuery, WordPress, Angular and Ionic are my key skills in web development. I am working with strong enthusiastic team with spirit. We provide all web related solution like HTML/CSS development, Web graphic design and Logo.