Problem with anydpi-v26 when creating launcher icon in Image Asset Studio

Viewed 3678

When creating an launcher icon (Adaptive and Legacy) in a Image Asset Studio with a Clip Art, images are created in the mipmap folder:

enter image description here

But for anydpi-v26, the standard icon for the foreground does not change, although the background color has changed:

enter image description here

ic_launcher.xml(anydpi-v26):

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

there are two files in the ic_launcher_foreground folder: ic_launcher_foregraund.xml (new icon) and ic_launcher_foregraund.xml (v24) (standard icon)

Why doesn't he change to a new drawing automatically? Thanks for any answer!

3 Answers

I had the same issue. Same solution. For some reason, the old file ic_launcher_foreground.xml is not deleted in the drawable folder when creating the new launcher icon. You end up with two files having the same name. So deleting it (without safe delete), solves the problem.

I removed the ic_launcher_foreground.xml(v24) file from folder: res/drawable/ic_launcher_foreground/, which remained from the standard icon.

This action solved the problem:

enter image description here

I encountered this issue because one of my libraries had a launcher icon defined. Bizarrely the app module read the ic_launcher_background from the app module, but the ic_launcher_foreground from the library module.

Related