简体   繁体   中英

IONIC - Upgrading to cordova-android11 from 9.1.0

I am working on the Ionic cordova-android upgrade to the latest(11).But while add platform I am getting below error

Error when running ionic cordova platform add android@11

I have added the few line to config.xml file.

Added tag to replace the old splash tag in config.xml

Targeting android-targetSdkVersion to 32

Also while build the app with ionic cordova build android I am getting this error

build error for ngModule decorator

Please let me know if I am missing something here.Thanks.

There are a lot of breaking changes when upgrading cordova-android and also when you update your target SDK. I would highly discourage doing all of them at once. What I would do instead is update them one by one. and read the update docs carefully (also the ones for the minor and patch updates):

https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html https://cordova.apache.org/announcements/2022/07/12/cordova-android-release-11.0.0.html And also the docs for the minor version updates.

I don't remember this specific error, but are what JDK are you using. One of the breaking changes is that you have to update from 8 to 11. That might be this one. But again, you will just get a different error when you've solved this one. There are too many breaking changes to do them all at once.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM