Uncategorized

Flutter – min sdk

Source: https://stackoverflow.com/questions/52060516/how-to-change-android-minsdkversion-in-flutter-project

The best way is to modify the value of the global minSdkVersion variable from its source, so all projects, new or old, will adopt it. Remember flutter.minSdkVersion means that the variable is in flutter directory (with the sdk).

The file in question is flutter.gradle.

the address is flutter-directory/packages/flutter_tools/gradle/flutter.gradle

class FlutterExtension {
    /** Sets the compileSdkVersion used by default in Flutter app projects. */
    static int compileSdkVersion = 31

    /** Sets the minSdkVersion used by default in Flutter app projects. */
    static int minSdkVersion = 16

    /** Sets the targetSdkVersion used by default in Flutter app projects. */
    static int targetSdkVersion = 31

change the value of the minSdkVersion from 16 to 20 or above, and do not disturb the code in build.gradle.

If you want, you can watch a video I made on Youtube, explaining it under: flutter configure minSdkVersion from 16 to 20 or above

Similar Posts