Reputation: 509
I have created two different flavours of my application. Both flavours start with a different main file. If we assume the versions are called A & B then I run would run version A like this:
flutter run --flavor a -t lib/main-a.dart
This creates and install the debug apk of version A. Now when I do the same for version B:
flutter run --flavor b -t lib/main-b.dart
the already installed apk for version A gets overridden. I was wondering if there was a possibility to have both apk's installed at the same time.
Upvotes: 0
Views: 350
Reputation: 2420
For having multiple install of app you need to chang applicationId ( you can add suffix to current ApplicationId base on you flavor (in android)) so:
flavorDimensions "default"
productFlavors {
dev {
applicationIdSuffix ".dev"
resValue "string", "app_name", "AppName_DEV"
}
prod {
applicationIdSuffix ".prod" . //or nothing..just remove this line
resValue "string", "app_name", "AppName"
}
}
Upvotes: 3