Corneliu
Corneliu

Reputation: 451

Android Studio build all flavors

I have a project that will have many flavors. What do to or how can i build all flavors variants at once? Or at least one by one .... me just hit one time "run"

productFlavors

        {
            Svone
                    {
                        applicationId "xx.xxx.xxxx.svone"
                        resValue "string", "app_name", "Svone"

                    }

            Svtwo
                    {
                        applicationId "xx.xxx.xxxx.svtwo"
                        resValue "string", "app_name", "Svtwo"

                    }
        }

in my gradle file i have signingConfigs and all my flavors should use the same *.jks

Thanks

Upvotes: 3

Views: 5455

Answers (2)

Moaz Rashad
Moaz Rashad

Reputation: 1075

Yes

you can use command line

./gradlew build

Or using gradle menu in android studio app -> Tasks -> build -> build

it will generate all apks in app/build/outputs/apk

Upvotes: 3

SQLiteNoob
SQLiteNoob

Reputation: 3022

In Android Studio, when you select Generate Signed APK, select Build Variants and then select Release -> Then it should build whatever you have selected for build type.

See the Build documentation and the Configuring Build Variants documentation for more.

Upvotes: -2

Related Questions