To change the version code and the minimum SDK version in a Flutter app, you’ll need to update the
minSdkVersion fields in the
Here’s how you can do it:
- Open the
android/app/build.gradlefile in your Flutter project.
- n the
defaultConfigblock, update the
versionNamefields to set the app’s version code and version name, respectively. The version code is an integer value that increments with each release, while the version name is a string value that is displayed to users.
- In the same block, update the
minSdkVersionfield to set the minimum SDK version that your app supports. This is the lowest version of Android that your app is compatible with.
- Save the file and rebuild your app to apply the changes.
Here’s an example of what the
defaultConfig block in the
build.gradle file might look like after updating the version code, version name, and minimum SDK version:
// Set the app's version code and version name
// Set the minimum SDK version