没有Android的工作室建立在默认情况下build.gradle什么产品风味? [英] What Product Flavor does Android Studio build by default in build.gradle?

查看:198
本文介绍了没有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.

这篇关于没有Android的工作室建立在默认情况下build.gradle什么产品风味?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆