How to build product flavors from Android Studio?

后端 未结 3 758
时光说笑
时光说笑 2021-02-02 05:35

I have defined some product flavors in my build.gradle. I am able to successfully build them using gradlew.

I can\'t figure out how I do so from the Androi

相关标签:
3条回答
  • 2021-02-02 06:09

    In the upper right hand corner of android studio click "gradle".

    Drop down your package > tasks > build > build { DOUBLE CLICK IT }

    This will begin building all your flavors.

    [enter image description here

    [enter image description here

    0 讨论(0)
  • 2021-02-02 06:24

    You can Choose the flavor you want to run on device or emulator selecting from the BuildVariants panel

    enter image description here

    To generate all the apk of each flavor , you can run the Gradle build task and the files will appear in the folder yourmodule / build / ouputs / apk .

    Build task can be run from the console or from the task pane Gradle

    enter image description here

    0 讨论(0)
  • 2021-02-02 06:27

    Build Variants appears as a vertical button along the bottom of the left edge of the workspace. If it's not visible, click the little rectangle icon on the lower left corner.

    0 讨论(0)
提交回复
热议问题