Debug School

rakesh kumar
rakesh kumar

Posted on

Flutter Error:Your app currently targets API level 30 and must target at least API level 31.

PROBLEM
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
    }
Enter fullscreen mode Exit fullscreen mode

in
Image description

Image description

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

My question what do I change it to?

SOLUTION:

0

Change targetSdkVersion

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

Image description

Top comments (0)