资讯详情

在Android Studio中看不到新创建的“值”文件夹

In Android Studio, I want to create the folders values-v14 values-v21 inside the res folder.

在Android Studio中,我想在res在文件夹中创建文件夹-v14 values-v21。

But when I tried to make it like: right click on res folder select option New >Directory, then after creating the folder, it is not visible in Android Studio. But when I select the option Show in Explorer, then it is visible.

但是当我试着用它的时候:右键单击res选择文件夹的选项New> Directory,然后在创建文件夹后,它Android Studio但当我在资源管理器中选择显示选项时,它是可见的。

How do I create a folder in Android Studio, so that I can change files like styles.xml, etc?

如何在Android Studio创建文件夹,这样我就可以更改它styles.xml等文件?

6 个解决方案

#1

91

Try to switch from Android to Project as shown below

尝试从Android切换到Project,如下所示

058f90aa4a2fd50961c6fe3f2826252d.png

#2

37

Switching from the Android view to the Project view will allow you to see the directory structure, but it is less convenient for viewing and editing Android files.

从Android将视图切换到项目视图将允许您查看目录结构,但查看和编辑Android文件不太方便。

There is a better way. Don't use New > Directory.

有更好的方法。不要使用新建筑>目录。

Right click values and choose New > Values resource file.

右键单击值,选择新建>值资源文件。

Select Version from the list and click the >> button. Write styles as the file name and 14 as the version number and click ok. (Repeat all this for version 21.)

从列表中选择Version,然后单击>>按钮。将样式写成文件名,将14作为版本号,然后单击确定。 (对版本21重复所有这些。

Android Studio will automatically create values-v14 and values-v21 directories with the new styles.xml files in them. And in your Android project view you conveniently see all three styles.xml files together.

Android Studio将自动创建values-v14和values-v21目录包括新目录styles.xml文件。在Android在项目视图中,您可以轻松查看所有三个styles.xml文件。

Other directories and resource files can be similarly added.

其他目录和资源文件可以类似添加。

#3

4

You can also manage language stuff with the editor, it′s a little faster.

您还可以使用编辑器来管理语言内容,速度更快。

#4

0

Instead to looking for the file from ANDROID, go to PROJECT and then look for the folder, you will find it there...

而不是从ANDROID查找文件,转到PROJECT然后找到文件夹,你会在那里找到它...

#5

0

I believe this is like version control, where the folder exists, but you need a file inside in order to view it. I just ran into this, and the folders existed but didn't show up until I had a file inside of them.

我相信这就像版本控制,文件夹存在,但你需要一个文件来查看它。我刚遇到这个,文件夹存在,但直到我有一个文件。

I hate to think this is by design. The use-case of a developer hiding their own work-space? Collapsing makes more sense

我讨厌设计。开发人员隐藏工作空间的用例?折叠更有意义

#6

0

it's so simple to find your new values-v21 or recently created.. (1) - Go to project files (2) - app > src > main > res (3) - if here is not visible your directory then (4) - right click on res and select show in explorer (5) - Go inside res here all your files are shows (6) - Then Go inside values > copy style file from there and come back to paste inside your values-v21 folder (7) - you are done .. go to your android studio and see your folder values-v21 is appearing.

找到你的新值-v21或者最近创建它太简单了..(1) - 转到项目文件(2) - app> src> main> res(3) - 如果这里看不到你的目录那么(4) - 右键单击res并选择在资源管理器中显示(5) - 在这里进入res所有文件均显示(6) - 然后在其中输入值>复制样式文件并返回粘贴到您的values-v(7)21文件夹 - 你完成了..去你的android工作室,查看您的文件夹值-v21正在出现。

Note :- Your folder was empty so you folder was not appear in android studio.

注意: - 你的文件夹是空的,所以你的文件夹没有出现在android studio中。

标签: v21光电开关传感器

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台