I\'ve switched to release build variant and configured signingConfigs. Now when I try to check the debug build variant from the drop down menu it switches immediately back to th
I had a similar problem where most of the Build menu items were greyed out.
'Sync project with Gradle files' didn't fix.
I noticed a 'Build Variants' toggle button on the bottom left of Android Studio (v 3.1.2) and with this was finally able to choose the variant I needed.
Maybe this will work for you too.