简体   繁体   English

不同的“构建变体”使用不同的配置

[英]Different Configurations for different “Build Variants”

I have four different build variants. 我有四个不同的构建变体。 However I find it irritating that I need to go to Project > Build Variant each time I need to build another variant. 但是,我感到烦恼的是,每次需要构建另一个变体时,都需要转到“项目”>“构建变体”。 Is it possible to link a Configuration directly to a build variant? 是否可以将配置直接链接到构建变体? Similar to how XCode can be used to build different version of an app using "Schemes". 类似于如何使用XCode使用“方案”来构建应用程序的不同版本。

From the Configuration settings there are only a link to the module and not the modules build varaint. 在“配置”设置中,只有指向该模块的链接,而没有模块构建变量。

I'm not familiar with XCode but you can easily change the variant you are building from "Build Variants". 我对XCode不熟悉,但是您可以轻松地从“构建变量”中更改要构建的变量。 This can be opened in 1 click from the bottom left corner of the IDE, see attached image. 可以从IDE左下角单击1来打开它,请参见附件图像。 If it doesn't show there for you clicking the icon at the bottom left will provide it. 如果没有为您显示,请单击左下方的图标将其提供。

构建变体

Alternatively, you can set a shortcut for the view by going to File->Settings->Keymap and search for "Build Variants". 另外,您可以通过转到文件->设置->键盘映射并搜索“构建变体”来设置视图的快捷方式。 This path is ok for Windows and Linux OSes but slightly different on Mac OS X which I believe you are using. 对于Windows和Linux操作系统,此路径是可以的,但在我相信您正在使用的Mac OS X上,该路径略有不同。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过gradle构建不同的android变种 - how to build different variants of android through gradle 用于配置构建变体的不同git repo - Different git repo for Configure Build Variants 如何针对不同的构建变体使用不同的network-security-config? - How to have different network-security-config for different build variants? 如何创建指向不同服务器的不同构建变体? - How to create different build variants pointing to different Servers? 如何在 Flutter Android 中创建构建变体,以便每个构建变体都有不同的应用程序 ID? - How to create build variants in Flutter Android so that each build variants have different app id? 为不同的构建类型和产品风格添加不同配置的正确方法 - Right way to add different configurations for different build types and product flavours Xamarin firebase 不同的 google-services,json 用于不同的构建配置 - Xamarin firebase different google-services,json for different build configurations 有没有办法为 Android 中的不同构建变体配置维护不同的 .gradle 文件? - Is there a way to maintain different .gradle files for different build variant configurations in Android? 根据应用程序构建变体不同的 string.xml 文件 - Different string.xml files according to app Build Variants 如何以编程方式将Firebase Google JSON更改为不同的构建变体? - How to programatically change Firebase google JSON for different build variants?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM