棉花糖上未显示圆形图标

Round icon not showing on Marshmallow

我的测试设备是 Android 6.0。它为所有应用程序(我的应用程序除外)使用圆形图标。由于这是唯一的测试设备,而且我的 phone 没有使用圆形图标,所以我必须让它在测试设备上运行。

我试图让它显示一个圆形图标,但到目前为止我没有成功。

我已经将所有 ic_launcher_round 图片设置为不同的分辨率。我还为 "ic_launcher_round.xml" 文件创建了一个 "app_icon_round" 图片。 所有 ic_launcher_round 图片大小都合适...我已经检查过多次了。

ic_launcher_round.xml:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/app_icon_round" />
</adaptive-icon>

AndroidManifest.xml,:

<application
    ...
    android:icon="@mipmap/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round"
    ...
</application>

我总是使用 Android Studio 安装它。我注意到当我在启动画面上工作时,我需要手动卸载该应用程序,重新启动 phone,然后通过 Android Studio 安装它以注意更改。

我想我遗漏了一些小东西,但不知道是什么。我在网上看到的答案没有提到我没做过的事情

Android 6.0 设备将显示您的 @mipmap/ic_launcher 图标。如果您希望启动器图标在 Android 6.0 上是圆形的,请将 @mipmap/ic_launcher 设为圆形。

android:roundIcon 仅在 Android 7.1 上使用,自适应图标仅在 Android 8.0+ 上使用。