1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Where is the value of "flutter.minSdkVersion" in Flutter project initialized?

Discussão em 'Mobile' iniciado por Stack, Outubro 9, 2024 às 11:42.

  1. Stack

    Stack Membro Participativo

    I have created a new Flutter project, and this is how the minSdkVersion looks like in the app/build.gradle file:

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


    Where is the value of flutter.minSdkVersion set?

    Note that previously, that config value looked like the following:

    defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.projectname"
    minSdkVersion 19 //*** This is the part that needs to be changed, previously was 16
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }


    Also, this is the content of the android/local.properties file:

    sdk.dir=/Users/usernaem/Library/Android/sdk
    flutter.sdk=/Users/username/flutter
    flutter.buildMode=release
    flutter.versionName=1.0.0
    flutter.versionCode=1


    As you can see, the value of flutter.minSdkVersion is not set there, but the project can be compiled and built successfully.

    Where are the flutter.minSdkVersion and flutter.targetSdkVersion variables initialized?

    P.S. related issue: https://github.com/flutter/flutter/issues/95533

    Continue reading...

Compartilhe esta Página