Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update minSdkVersion and targetSdkVersion in the new version of flutter 2.8.0

On file build.gradle I found code like this

minSdkVersion flutter.minSdkVersion

targetSdkVersion flutter.targetSdkVersion

How can I change the values from where they are initialized ? 1

like image 534
rachidev Avatar asked Dec 30 '25 23:12

rachidev


2 Answers

flutter 2.9.2 in [prj]/android/app/src/build.gradle change :

minSdkVersion flutter.minSdkVersion

to (for example) :

minSdkVersion localProperties.getProperty('flutter.minSdkVersion')

and in [prj]/android/local.properties add/change:

flutter.minSdkVersion=XX
like image 74
kaa Avatar answered Jan 06 '26 10:01

kaa


You can simply change these in android/local.properties file.

define or change them inside android/local.properties:

org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

// add these lines
flutter.minSdkVersion=21
flutter.targetSdkVersion=29
like image 20
Sajad Abdollahi Avatar answered Jan 06 '26 11:01

Sajad Abdollahi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!