Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs
Asked Answered
S

2

20

I was just trying to deploy an app on google play store and got this error.

How do I change my target api to 31. I am aware it needs to be changed in build.gradle file under android/

This is mine:

ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 30
    }

Expo has a way to add it through my app.config.js using build properties

My question what do I change it to?

Sprang answered 30/9, 2022 at 22:13 Comment(3)
Change the targetSdkVersion to 31. Right now its 30. But really I'd update it to 32 if not 33 unless you have reason not to- updating is a bit of a pain, may as well upgrade it as high as possible.Guess
did ugprading the sdk version to 31 worked? I tried this but now I get more errorsThumping
@JohhanSantana did you see the answer??Sprang
E
19

Change targetSdkVersion

ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
    }
Eurypterid answered 1/10, 2022 at 15:11 Comment(2)
It is effecting on my app and build is not created. Is there any other solution?Conclave
I also getting the same issues , please update the solutionMargaux
S
0

You can change the Target SDK version from Android Studio like so:

  1. Go to File->Project Structure
  2. Click on Modules from the left sidebar, and then Default Config. Your screen should look like on the screenshot below, where you can see the Target SDK Version. Change it from there.

enter image description here

Stoddart answered 5/7 at 0:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.