Build failed with an exception using flutter flavors

Viewed 23

When I use the Flutter flavor the app gets an error

My app/build.gradle

android {
    compileSdkVersion flutter.compileSdkVersion
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.insurance_admin"
        // You can update the following values to match your application needs.
        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
    
    flavorDimension "flavor"
    productFlavors{
        prod{
            dimension "flavor"
            resValue "string","app_name","Admin Prod"
            applicationIdSuffix ""
        }
        qa{
            dimension "flavor"
            resValue "string","app_name","Admin QA"
            applicationIdSuffix "-qa"
        }
        dev{
            dimension "flavor"
            resValue "string","app_name","Admin Dev"
            applicationIdSuffix "-dev"
        }
    }
}

error throw in line 28 I Have already used Flutter doctor, it perfectly works on google chrome but it doesn't support mobile and emulator

enter image description here

attach my errors

I don't use any other firebase JSON files

enter image description here

attach my project folder

0 Answers
Related