androidandroid-studiodrawablehdpi

Android Studio doesn't recognize images in hdpi folder


I saved some images directly to the drawable folder. These, Android Studio recognizes normally. But the images saved in the mhdpi, hdpi, xhdpi, xxhdpi and xxxhdpi folders the code does not recognize and shows an error. Does anyone know what's going on? Thanks!


Solution

  • Try making new drawable folders for putting images after right clicking res folder and name folders like this

    drawable-hdpi

    drawable-mdpi

    drawable-xhdpi

    drawable-xxhdpi

    drawable-xxxhdpi

    Drag and drop image with same name according to their dimensions. The android takes drawable folder as one entity, picks up the best suited image and shows it on different resolution phones.

    enter image description here