Android Mipmap?

2019-06-16 03:42发布

Whenever I try to generate a new Android project with AndroidStudio, it keeps hiding the folder "drawables". This has never happened to me before. I've been looking around and I've realized its been generating this folder called "mipmap". I searched around a little bit and I've found this is similar to drawables, but was this some big change in the new AndroidStudio release I missed?? If not how can I get my Drawables folder back? I've tried rebuilding my project, creating new projects and even deleting all my AndroidStudio caches, preferences and logs. P.S. I'm on OSX.

Wut Android Mipmap?

3条回答
霸刀☆藐视天下
2楼-- · 2019-06-16 04:16

This is a change that is being put into Android Studio 1.1. There is not much documentation about using mipmaps it at the moment but for a run down take a look at the following blog.

https://androidbycode.wordpress.com/2015/02/14/goodbye-launcher-drawables-hello-mipmaps/

If you want to use drawable instead of mipmap folders then you can just recreate the folder structure and access images using @drawable instead of @mipmap in your AndroidManifest.xml.

查看更多
老娘就宠你
3楼-- · 2019-06-16 04:26

Don't panic, just because Android Studio doesn't generate them automatically it doesn't mean you can't add manually those folders.

On your project tree, right click on the res folder and select "New resource directory" then you can choose drawable and add the properties that you want. (mdpi, hdpi, etc)

Check this for more info

查看更多
聊天终结者
4楼-- · 2019-06-16 04:30
android:icon="@mipmap/ic_launcher"
查看更多
登录 后发表回答