Ionic 3: Android deployment


I’ve been developing an ionic 3 app for few months now and when i tried to upload it to play store it gives me this error:

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

How would i upgrade to API 31 ? Kindly, guide me.

you have to use cordova-android 11


cordova platform rm android
cordova platform add android@latest

It gives me this error:

  • What went wrong:
    A problem occurred evaluating script.
    No usable Android build tools found. Highest 32.x installed version is 30.0.3; Recommended version is 32.0.0.
    Command failed with exit code 1: /home/USER/FOLDER/PROJECT_FOLDER/platforms/android/gradlew :app:bundleRelease -b /home/USER/FOLDER/PROJECT_FOLDER/platforms/android/build.gradle

is it a problem with my gradle ? android sdk ? or ionic package ?

you have to download SDK tools 32.0.0

open Android Studio
then click the SDK manager button (right top corner)
then SDK tools
then Android SDK Build-Tools
then check 32.0.0
finally click Apply