Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating resource files for different build types on 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.

like image 299
Javier P Avatar asked Nov 04 '14 16:11

Javier P


People also ask

What is a resource file in Android Studio?

Resources are the additional files and static content that your code uses, such as bitmaps, layout definitions, user interface strings, animation instructions, and more. You should always externalize app resources such as images and strings from your code, so that you can maintain them independently.

Which file is resource in Android?

The resources locates inside res directory of your app. The Android resource compiler processes resources arcording to which subforder they are in and the format of the file, for example: res/drawable : Contains all resources file that can be drawable, such as (. png, .


1 Answers

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 Res folder createRes folder creation wizard

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

Menu selection to create values folder

Build type selection

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

like image 120
Javier P Avatar answered Sep 29 '22 21:09

Javier P