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
What actually worked for me is enabling "Android Studio Preferences -> Experimental -> Only sync the active variant". After you select the desired build variant once, AS will keep the selected build variant when reopening or when re-syncing the project, basically solving the original problem.
AS/AGP v4.1.