Amit Bahadur
Amit Bahadur

Reputation: 269

How to create different build apk for different flavour in Flutter

I went through many docs but still can't find the exact solution for this

I tried all the possible command

flutter build apk --flavor development --release
flutter build apk --flavor staging --release

flutter build apk --flavor production --release

flutter build apk --flavor production --release


Upvotes: 0

Views: 516

Answers (1)

Kasymbek R. Tashbaev
Kasymbek R. Tashbaev

Reputation: 1473

If you want apk with different app id for each flavor then you have to add applicationId property to each flavor in productFlavors in app's build.gradle

android {
    productFlavors {
        development {
            applicationId "com.example.productFlavors"
        }
        staging {
            applicationId "com.example.staging"
        }
        production {
            applicationId "com.example.production"
        }
    }
}

Upvotes: 0

Related Questions