在 Android Studio 上为不同的构建类型创建资源文件 [英] Creating resource files for different build types on Android studio

查看:30
本文介绍了在 Android Studio 上为不同的构建类型创建资源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我升级到 Android Studio 0.8.14 并且我已经知道我可以在我的模块 app/src/newbuildtype 上创建一个新文件夹,在那里我可以创建特定于我的构建类型的文件夹 java 和 res,但是我想要的是直接从 Android Studio 创建资源.有没有办法做到这一点?我想避免的是直接使用我的文件资源管理器创建文件夹,谢谢.

So I upgraded to Android Studio 0.8.14 and I already know that I can create a new folder on my module app/src/newbuildtype and there I can create the folders java and res specific to my build type, but what I want is to create the resources from Android Studio directly. Is there a way to do this? What I want to avoid is to create folders directly with my file explorer, thanks.

推荐答案

所以我发现我可以通过右键单击我的模块,从菜单 New->Folder-> 中选择这个选项来创建一个 app/debug/res 文件夹资源文件夹

So I found that I can create a app/debug/res folder by right-clicking on my module, selecting this options from menu New->Folder->Res Folder

之后,您可以创建,让我们通过右键单击我的应用模块 -> New->XML->Values 文件夹并选择我的构建类型来说 values 文件夹

After that you can create, let's say the values folder by right-clicking on my app module -> New->XML->Values folder and selecting my build type

您已经在调试构建类型上创建了 values 文件夹,现在看起来像这样

And there you have created your values folder on debug build type, that now appears like this

这篇关于在 Android Studio 上为不同的构建类型创建资源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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