Goldy Saajan Bakshi
Goldy Saajan Bakshi

Reputation: 1

I'm trying to add to mipmap in my app I have missing files/errors but it won't let me

I am trying to fix these errors which has caused the build to fail. But I am noticing in the newest version of Studio it wont let me add the image files to mipmap to fix the problem. What should I do?

enter image description here

Upvotes: 0

Views: 569

Answers (2)

sabby singh
sabby singh

Reputation: 1

 <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />

just put this in your file and it will work

Upvotes: 0

yoav
yoav

Reputation: 191

Your project doesn't build because in your XML file there is a ImageView with unrecognized image/source, @mipmap/ic_default_user. Thus, you must change the source image to one that the XML will recognize:

  • Instead of @mipmap/ic_default_user write some thing else. e.g @mipmap/ic_launcher or @mipmap/ic_launcher_round
  • You may see what images the XML recognize by writing "@mipmap/" and then press ctrl+space when you are in focus of "@mipmap/".

Upvotes: 0

Related Questions