简体   繁体   中英

android application icon is white circle

I have made some icon for my app and I have tested it on some old Samsung galaxy phone and it showed the icon is a nice square shape.

For some reason, on a newer phone + on the Emulator it shows a white circle as follows:

在此处输入图像描述

My manifest file looks as follows:

<application
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher_custom"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_custom_foreground"
    android:supportsRtl="false"
    android:theme="@style/CustomActivityTheme">

and my mimap is:

在此处输入图像描述

How can I solve it please?

Thank you

Move the mipmap content out of the project
then create app icons with Asset studio (right click on project panel > new > Image Asset)
and set icons in manifest like this:

  <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">

Manifest:

<application
        android:icon="@mipmap/ic_launcher"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher_custom"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_custom_foreground"
        android:supportsRtl="false"
        android:theme="@style/CustomActivityTheme">

Screenshort:

在此处输入图像描述

mipmap-anydpi-v26

在此处输入图像描述

After the @drawwable/invitation icon find for this Folder

res/drawable-xhdpi

在此处输入图像描述

The @mipmap/ic_invitation_maker icon find for this Folder

mipmap-hdpi

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM