问题
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.
回答1:
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.
回答2:
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
回答3:
android:icon="@mipmap/ic_launcher"
来源:https://stackoverflow.com/questions/28424952/android-mipmap