androidandroid-studiobuild-variant

Android Studio 3.6 always select the first build variant


I've just updated to Android Studio 3.6 stable version. After that, every time I open my project. The Android Studio changes my selected build variant to the first item in the variant list. Then I have to change the selected variant and sync gradle again. :(

Anyone have solution for this?


Solution

  • To fix this issue, you can mark the flavor that you use regularly as default:

    flavor {
            isDefault.set(true)
            ...
    }
    

    This way the IDE will pick this flavor when it starts, instead of relying on the alphabetical order.