没有Android的工作室建立在默认情况下build.gradle什么产品风味?

没有Android的工作室建立在默认情况下build.gradle什么产品风味?

问题描述:

我们有一个使用新的摇篮构建系统的Andr​​oid项目,而我们使用机器人工作室作为开发工具。当有在 build.gradle 指定的多个产品的口味,我们注意到,机器人工作室建立按字母顺序指定的第一个。有没有办法告诉机器人工作室的建立和发展过程中只测试一个特定的产品味道?

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?

在工作室窗口的左下角有一个停靠的观点称为构建变体。

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

打开并选择任何变量,你想工作。这将影响该变种是建立也是启用源文件夹,这将推动完成在code和资源编辑器。

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.