关于图片:Android Studio上没有不同的可绘制文件夹

Theare aren't different drawable folders on Android Studio

我想在我的应用程序中集成不同的图像大小,但是问题是在Android Studio中没有drawable-Idpi,mdpi,hdpi,xhdpi文件夹。
我已经检查了其他线程,答案是我只需要跳到Project视图而不是Android视图。 但是结果是一样的。 只有一个一般文件夹称为drawable

enter image description here

enter image description here

而且,如果我尝试添加其他资源文件夹,则可绘制对象将丢失。

enter image description here


只需创建一个新文件夹:

右键单击" res"文件夹->新建-> Android资源目录。

在向导中,选择drawable作为"资源类型"。然后从资源限定符中选择"密度"。

关于" mipmaps"文件夹,Android现在更喜欢这些文件夹中的应用程序图标,因为它可以使用密度与屏幕密度不同的图标。

有关此处的mipmap的更多信息:http://android-developers.blogspot.de/2014/10/getting-your-apps-ready-for-nexus-6-and.html


我之前也遇到过同样的问题。
我通过从http://www.icons4android.com/下载想要的图标来修复它

现在,该站点为每个图标提供了所有drawable-Idpi,mdpi,hdpi,xhdpi文件夹供下载,我只突出显示了所有drawable-Idpi,mdpi,hdpi,xhdpi文件夹,将其复制并粘贴到android studio中res文件夹。
(我在android view中做到了)

我希望这有帮助


您可以创建与drawable,drawable-hdpi,mdpi,xxhdpi等相同的文件夹

它看起来像

enter image description here

但是当您看到源代码使用

enter image description here

enter image description here

在draweble中添加图像,它询问您要添加到哪个文件夹中(在Studio中复制n个过去的图像)

enter image description here

您可以直接在res中创建文件夹,也可以使用...