5

When I created a new flutter app, the content of android\app\build.gradle is

...
defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.app_name"
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }
...

What is flutter.minSdkVersion? Where it comes from? How do we know the actual value of it?

2
  • 1
    It must be coming from flutter framework based on what flutter version is being used for compatibility related issues between android and flutter. Look for local.properties file where they are written by flutter build system when you compile app. Commented Mar 25, 2022 at 8:03
  • 1
    I believe it comes from this file: flutter/packages/flutter_tools/gradle/flutter.gradle Commented Mar 25, 2022 at 9:48

1 Answer 1

5

flutter.minSdkVersion value is coming from your installed flutter SDK's flutter.gradle file which is located inside your_flutter_sdk/packages/flutter_tools/gradle/flutter.gradle

In Simple words flutter.minSdkVersion is your project will support from that android version. If you want to change for particular project then you can replace flutter.minSdkVersion with 18 or other SDK number you want.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.