Image in stretched but still getting error

So, I keep running into this error for my ImageView even though I have a copy / paste of an image in a folder and have it called in my ImageView XML:

    <ImageView

    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/home_screen" />

      

What am I doing wrong?

+3


source to share


4 answers


Nothing seems to be wrong, so try rebuilding and updating your project. Maybe close and reopen your android studio.



+2


source


Since I can see that nothing is working with your code, try the steps I give you:

1.- Delete home_screen.png from the folder Drawable

.



2.- Reset / rebuild the project (even if you want to reload the IDE)

3.- Try again, copy and paste the image into the folder Drawable

+1


source


I don't know for sure if this will help you, but as soon as it happens to me. The IDE was not showing the error I did when I wrote one class. After reading all the code, I was able to find and fix it.

After that, the R class was updated and the resource was found.

0


source


Remove all XML style documents. And add XML documents again. But create a new drawn file. And don't copy paste the XML file. just add a new drawn file. I fixed this issue in this method.

0


source







All Articles