How to set targetSdkVersion 33 in ionic application?

1.9k views Asked by At

I have created an ionic application using ionic 6 and it works fine. I would like to upload this app to the Google Play Store. I added targetSdkVersion version 33 to the config.xml file based on the Play Store documents. <preference name="android-targetSdkVersion" value="33" /> After adding this line, I was unable to create the Android build.

When I create a build, I get an error message

Gradle sync failed: Unable to load class 'org.gradle.api.plugins.MavenPlugin'.
        This is an unexpected error. Please file a bug containing the idea.log file.
1

There are 1 answers

0
George Raveen On

I was able to change the API version as follows in Android studio.

  1. Go to Project Structure
  2. Click on modules
  3. Change values
  4. Apply and click OK