How to Change minSdkVersion and targetSdkVersion in Flutter

In this post, we are going to show you how to change or edit minSdkVersion and targetSdkVersion of Android in your Flutter Project. "minSdkVersion" and "targetSdkVersion" are very important factors for your app. See the methods below to change it.

Open: your_project/android/app/build.gradle file. And find the code below:

defaultConfig {
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion

Now, you can edit them like below with your own minSdkVersion and targetSdkVersion:

defaultConfig {
        minSdkVersion 16 // here, change minSdkVersison
        targetSdkVersion 28 //here, change targetSdkVersion

Here, we have set 16 to minSdkVersion and 28 to targetSdkVersion. You can set this version number according to your need.

In this way, you can edit minSdkVersion and targetSdkVersion of your Flutter project.

No any Comments on this Article

Please Wait...