Search code examples
androidflutterandroid-studiobuild-toolsflutter-android

Upgrading flutter android build tools


Flutter is building apk on android API level 29 by default I want to upgrade it to 30 how can I? I am new to flutter I don't know, I tried to google it but it wasn't helpful


Solution

  • Open a Flutter project in Android Studio and you have to edit the build.gradle file. In a flutter project, it is found at the path ./android/app/build.gradle

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.projectname"
        minSdkVersion 19
        targetSdkVersion 28 // Set this to 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    

    Inspiration from this answer and modified accordingly