Android Studio drawable folders
Solution 1
If you don't see a drawable folder for the DPI that you need, you can create it yourself. There's nothing magical about it; it's just a folder which needs to have the correct name.
Solution 2
Actually you have selected Android from the tab change it to project.
Steps
Then you will found all folders.
Solution 3
In order to create the drawable directory structure for different image densities, You need to:
- Right-click on the
\res
folder - Select
new >
android resource directory
In the
New Resource Directory
window, underAvailable qualifiers
resource type section, selectdrawable
.Add density and choose the appropriate size.
Solution 4
In Android Studio 1.2.1.1
Just copy the image and paste the image into the app > res > drawable folder and it will shows you "Choose Destination Directory" popup screen as shown below screen
Now you can select option whatever resolution you want to place and if you want to view the those image into the folders then simply right click on the drawable folder > select copy paths option and open it. It will help you.
Solution 5
Its little tricky in android studio there is no default folder for all screen size you need to create but with little trick.
- when you paste your image into drawable folder a popup will appear to ask about directory
- Add subfolder name after drawable like drawable-xxhdpi
- I will suggest you to paste image with highest resolution it will auto detect for other size.. thats it next time when you will paste it will ask to you about directory
i cant post image here so if still having any problem. here is tutorial..
user3397545
Updated on July 05, 2022Comments
-
user3397545 almost 2 years
In Android Studio, I can't figure out where to put images to be used inside the app. The drawable folder isn't broken down into drawable-hdpi, drawable-ldpi, etc. I saw another question asking this and the answer was to switch to Project view instead of Android view but drawable is only one folder there too. There is mipmap-hdpi, mipmap-ldpi, etc, but people are saying that's only for app icons. I'm confused.
-
user3397545 about 9 yearsI suppose I'll do this. I'm curious why the folders aren't there though when they should be there.
-
yole about 9 yearsWhy exactly do you think they should be there?
-
Krupal Shah about 9 yearsBut hey what was the need to remove default folders? and changes like showing bar left side of braces are also have been changed. You guys are degrading the UI of Android Studio in each update.
-
mba12 almost 9 yearsI'm new to Android as well and experiencing the same issue. It's really not a bit deal to create the subfolders but I found it a little disorienting while trying to follow a tutorial to have the default folders missing. Moreover, the tutorial instructions were to drag and drop images into the drawable folder in Android Studio and that didn't work either. Just so you know in the latest version of Android Studio the subfolders do not exist in Project mode either.
-
IshRoid almost 9 yearsJust Write click on res folder after expanding folders, Then create new Directory, named it your desire DPI folder
-
codebased almost 9 yearswould have been nice that what difference does it makes in Project vs Android selection. To me Android defines everything that means to apk. where as project is just an explorer. Overall I m happy I found the magic through you :)
-
NaveenThally almost 9 yearsi'm using Android Studio 1.2.1.1 i don't find the default folders even in project selection but have some folders like mipmap-hdpi,mipmap-ldpi etc
-
IshRoid almost 9 yearsfor mipmap folders this link will explain stackoverflow.com/questions/28065267/mipmap-vs-drawable-folders
-
Timothy Steele over 8 yearsIn "Supporting Multiple Screens", under "Using Configuration Qualifiers", Google explains you have to have to do it yourself, just as @yole explained. It's in the documentation.
-
ban-geoengineering over 8 years@yole Because they were there in Eclipse. Also, whilst it is understandable that separate folders exist for mipmap (as they are usually pre-populated with the launcher icons), not having separate folders when Android Studio creates the project does introduce an inconsistency - which many wouldn't expect or immediately understand.
-
Admin over 8 yearsI have a question. I have put all the appropriate images in all the appropriate folders, but when I try to make an
ImageView
with the `android:src = "@drawable/myimg"/>, I get cannot resolve. Do I need the image to also be in the drawable folder as well as the sub folders? I have been stuck on this for the last 4 and a half hours, thanks for your help! -
Admin over 8 yearsI have a question. I have put all the appropriate images in all the appropriate folders, but when I try to make an
ImageView
with the `android:src = "@drawable/myimg"/>, I get cannot resolve. Do I need the image to also be in the drawable folder as well as the sub folders? I have been stuck on this for the last 4 and a half hours, thanks for your help! -
Snake almost 7 yearsIf you put it in drawable then it means that it will not get resized
-
Admin almost 7 years@user5562706 No, everything should work just fine. Try to clean your project. Cleaning works wonders. I hope it works for you.
-
Mohit Raval over 6 yearsSimply go to project Explorer and change your View from Android to project from drop Down and you are good to go.There you can simply create folder like we do in Eclipse. And in android project view it is hidden but when you switch to project. You can create folder like drawable-hdpi,drawable-xhdpi.
-
john ktejik over 5 yearsdrawable isn't an option in my android studio 3.1.14
-
Mihir Trivedi about 4 yearsWhat about post / pre API level?