如何在“最近”屏幕中更改应用程序图标?

问题描述

我知道如何更改应用程序的图标,但是当我查看Recents Screen时,该图标是默认图标。

应用程序图标(到目前为止一切正常):

enter image description here

“我的近期记录”屏幕中的图标:

enter image description here

这是我的“ AndroidManifest.xml”的“应用程序”标签

<application
    android:name=".App"
    android:allowBackup="true"
    android:icon="@mipmap/iconout"
    android:roundIcon="@mipmap/iconout"
    android:logo="@mipmap/iconout"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

我已经尝试了许多在此平台上找到的解决方案(不起作用),例如:

  1. 文件->新建->图像资产->选择图像..
  2. 安装并取消安装该应用程序
  3. 构建和清理项目
  4. 删除项目中的所有默认图标
  5. 将我的图标从mipmap文件夹拖放到可绘制对象

还有其他可能的解决方案吗?预先谢谢你!

解决方法

好的,我找到了解决方案,并决定为将来会遇到相同问题的任何人提供答案。

我通过在android:icon="@mipmap/iconout"的主activity标签声明中添加AndroidManifest.xml来解决此问题,就像这样:

<activity
        android:icon="@mipmap/iconout"
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

这是最终结果:

enter image description here

,

尝试将图标的格式更改为PNG。对我有用。

或者您可以在其他设备上尝试该应用程序,以查看它是否不是模拟器/电话的问题。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...