Skip to content

On Android when there are multiple flavors and no --flavor flag is specified then use a default one #22856

@radiKal07

Description

@radiKal07

On Android, when there are multiple flavors defined, and the user runs the app but does not specify a value for the --flavor flag then the following error is shown:

You must specify a --flavor option to select one of them.

This is implemented like that here: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/gradle.dart#L342

This makes it so that everytime we have to specifiy a value for --flavor.
I would propose when the flag is not specified to just default to the first one.
This will make it faster to start your Flutter app, not having to write --flavor _flavor_ everytime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityt: gradle"flutter build" and "flutter run" on Androidteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions