Terry Windwalker
Terry Windwalker

Reputation: 1888

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

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?

Upvotes: 0

Views: 4830

Answers (1)

Terry Windwalker
Terry Windwalker

Reputation: 1888

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.

Upvotes: 2

Related Questions