Migrate to cordova 11.0.0

Google Play Store has updated the target API level requirements. All app submissions are required to target Android 12 (API level 31) or higher. Cordova developers also need to upgrade to cordova-android 11.0.0. Check out following link for cordova update instructions.

https://www.netexl.com/blog/use-cordova-to-compile-html5-games-to-android-app/

Once we update to cordova version 11 there are a few dependencies which also need to be updated.

Android SDK Build Tool version should be updated to min 32.0.0. Go to SDK Manager -> Android SDK -> SDK Tools (select show package details checkbox) and make sure 32.0.0 is installed. If not, select and install it.

We also need to update java version to java 11 otherwise you will see an error as following when compiling the APK.

Android Gradle plugin requires Java 11 to run.

If its an old project, delete previous platform and add new by specifically specifying the version

cordova platform remove android
cordova platform add android@11.0.0

For new projects simply add the platform as following

cordova platform add android@11.0.0

References:

https://cordova.apache.org/announcements/2022/07/12/cordova-android-release-11.0.0.html

https://ionic.zendesk.com/hc/en-us/articles/7891143965975-Migrating-to-Cordova-Android-11


Leave A Comment

Your email address will not be published.