When working with Flutter and using external packages, you often have to change Minsdkversion according to the package you are using.
There are several ways to change Minsdkversion in Flutter, for more details, follow the following article.
Flutter Before Version 2.8
- Open the file “ build.gradle ” in “ Project > android > app > build.gradle ”.
- In ” defaultConfig ” change the value ” Minsdkversion “.
- Run ” flutter clean “.
Other Interesting Articles
Flutter After Version 2.8
- Open the file “ local.properties ” in “ Project > android > local.properties ”.
- On the last line add:
flutter.minSdkVersion=21 flutter.targetSdkVersion=30 flutter.compileSdkVersion=30
- Then on ” build.gradle ” change it to .
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger() targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()
- Run ” flutter clean “.