应用程序图标启动器在 Android 7.1.1 中不显示

Din*_*var 8 android android-7.1-nougat

我们正在实现一个圆形图标(带有前景和背景)和图标。

<application
    android:allowBackup="false"
    tools:replace="android:allowBackup"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:icon="@mipmap/logo" //normal logo
    android:roundIcon="@mipmap/logo_o" //Our logo with foreground and background
    android:name=".MyApplication"/>
Run Code Online (Sandbox Code Playgroud)

适用于每个版本,但不适用于 API 25

在此输入图像描述

我们的前景和背景代码是下一个

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@mipmap/logo_background"/>
    <foreground android:drawable="@mipmap/logo_foreground"/>
</adaptive-icon>
Run Code Online (Sandbox Code Playgroud)

pet*_*syn 1

就我而言,这是由于删除圆形图标的 PNG/位图版本引起的。

我只保留了mipmap-anydpi-v26圆形图标的 XML 版本。mipmap-hdpi并删除了、等文件夹中的所有圆形图标,mipmap-mdpi认为它们没有用。

当删除 PNG 位图的圆形版本时,它在除 Android 7.1 API 级别 25 之外的所有 Android 版本 (> 4.0) 上都能正常工作。