Home > Software design >  how to change my app's target API level from 29 to 31 in ionic android
how to change my app's target API level from 29 to 31 in ionic android

Time:01-06

I have updated my config.xml

    <preference name="android-minSdkVersion" value="22" />
    <preference name="android-targetSdkVersion" value="32" />
    <preference name="android-compileSdkVersion" value="32" />

But the actual built project is still targeting 29.

I have also tried to remove the android platform and then reinstall it @10 or @11. It doesn't change this.

Is there anything else I would need to do to apply the change?

CodePudding user response:

It turns out what I need to do is to do the following:

ionic cordova platform remove android
ionic cordova platform add android@10

And then it automatically become 31.

It seems that simply change the preference in config.xml won't do anything.

  • Related