What Product Flavor does Android Studio build by default in build.gradle?

Joe picture Joe · Jul 15, 2013 · Viewed 37.6k times · Source

We have an Android project that uses the new Gradle build system, and we use Android Studio as a development tool. When there are several product flavors specified in build.gradle, we notice that Android Studio builds the first one specified alphabetically. Is there a way to tell Android Studio to build and test only a specific product flavor during development?

Answer

Xavier Ducrohet picture Xavier Ducrohet · Jul 15, 2013

On the lower left of the Studio window there's a docked view called "Build Variants".

Open it and choose whichever variant you want to work on. This will impact which variant is built but also the enabled source folders, which will drive completion in code and resources editors.