Search code examples
imageandroid-studiogimp

why some images are underlined with red in android studio and others not?


In Android Studio I imported pictures using File | New | image asset. Some pictures work fine but others are not only underlined with a zigzag red line in the project structure area but also I can't use them in my project. The images underlined with red are in the drawable folder. For example I imported a picture "pizza-small.jpg" and it didn't work. I tried to change the format using Gimp to a png picture but without success. I tried changing the resolution and aspect ration without success also.

I'm using Android Studio Arctic Fox. I googled the question many times without success.

Screenshot


Solution

  • I resolved the problem by renaming the file name of the picture from "pizza-small.png" to "pizza_small.png".