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

查看:280
本文介绍了在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文件夹. 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

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

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

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

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