Legacy icon does not show when using adaptive icon

tyczj picture tyczj · Jun 8, 2017 · Viewed 9.9k times · Source

I just converted my app icon to be compatible with android o's adaptive icons using the Image Asset Studio in android studio

when I run my project now on my device running API 25 I get the default green android icon and not my icon.

this is my manifest

<application
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:allowBackup="false"
    android:roundIcon="@mipmap/ic_launcher_round"
    tools:replace="allowBackup"
    tools:ignore="GoogleAppIndexingWarning">

and these are the files the image asset studio created

enter image description here

Is this just an Android Studio bug or did I miss something?

Answer

String picture String · Jun 10, 2017

I had the same trouble, and solved it by renaming my mipmap-anydpi directory to mipmap-anydpi-v26.

Apparently the ic_launcher.xml file confuses older Android versions, and this hides it from all but O. At any rate, my icons now work on all versions (down to SDK 11, at least).