Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select Build Variant menu item greyed out

In Android Studio 3.0.1 I tried to go to Build > Select Build Variant but the option "Select Build Variant" was greyed out. How do I access this menu option?

like image 726
Michael Osofsky Avatar asked Mar 14 '18 21:03

Michael Osofsky


People also ask

How do I change a variant in build?

NOTE: By default, the Android Studio will generate "debug" and "release" Build Types for your project. So, to change a Build Type, all you need to do is just select your Build Type from the Build Variant and after the project sync, you are good to go.

Where is build variants in Android Studio?

By default, Android Studio builds the debug version of your app, which is intended for use only during development, when you click Run. To change the build variant Android Studio uses, select Build > Select Build Variant in the menu bar.

What is missingDimensionStrategy?

What is missingDimensionStrategy? void missingDimensionStrategy ( String dimension, String requestedValue) Specifies a flavor that the plugin should try to use from a given dimension in a dependency. Android plugin 3.0. 0 and higher try to match each variant of your module with the same one from its dependencies.

What is build flavor in android?

Android Product Flavors are used to create different app versions. App versions can be free or paid. They can have different themes and texts. They can use different environments or APIs. Let's assign two product flavors free and paid in our application.


1 Answers

I found that the "Select Build Variant" menu item became available as long as I wasn't viewing the project-level build.gradle file. While editing the project-level build.gradle file, the menu option was grayed out. But if I opened a different file, for example a module-level build.gradle file, the "Select Build Variant" menu item became available.

like image 71
Michael Osofsky Avatar answered Sep 29 '22 23:09

Michael Osofsky