This website will be permanently discontinued and will no longer be accessible.
FINAL DAY OF SERVICE: 26 November 2024
Thank You for Your Support
Dear valued users,
We want to inform you that this website will be permanently shutting down. After this date, all services and content will no longer be accessible.
We sincerely thank you for your support and trust throughout our journey.
Important Dates:
Last Day: 26/11/2024
Data Access:Until the last day
Dear valued users,
We want to inform you that this website will be permanently shutting down. After this date, all services and content will no longer be accessible.
We sincerely thank you for your support and trust throughout our journey. Important Dates: Last Day: 26/11/2024 Data Access:Until the last day
Today you will learn how you can easily change the Android minSdkVersion in Flutter for both (Before 2.8 Update and After Flutter 2.8 Update) versions.
Inside the terminal, run the flutter clean command.
flutter clean
Step 6: Re build you app.
Your Android minSdkVersion will be changed.
Example:
local.properties
sdk.dir=/Users/HussainHumdani/Library/Android/sdk
flutter.sdk=/Users/HussainHumdani/development/flutter
flutter.minSdkVersion=21 #here you add the minSdkVersion
build.gradle File (android/app/build.gradle)
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.cwh2"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
// minSdkVersion flutter.minSdkVersion Old Line
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger() //New Line
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Project Created Before 2.8 Update
Step 1: Go to the build.gradle file
project_folder/android/app/build.gradle
Step 2: Find defaultConfig and update minSdkVersion
defaultConfig {
applicationId "com.example.cwh"
minSdkVersion 21 // This is the value that you update
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Step 3: Clean the flutter project
Clean the flutter project by running this command in the command prompt.
flutter clean
Step 4: Re-build your flutter app.
Now your android minSdkVersion will be updated.
Conclusion
Hope you understand the process of changing android minSdkVersion in Flutter. See more