【问题标题】:android application icon is white circleandroid应用程序图标是白色圆圈
【发布时间】:2020-02-22 17:02:57
【问题描述】:

我为我的应用制作了一些图标,并在一些旧的三星 Galaxy 手机上对其进行了测试,结果显示该图标是一个漂亮的方形。

由于某种原因,在较新的手机上 + 在模拟器上它显示一个白色圆圈,如下所示:

我的清单文件如下所示:

<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">

我的 mimap 是:

请问如何解决?

谢谢

【问题讨论】:

  • 设备特定问题..?
  • 您使用哪个操作系统..?
  • 使用安卓。不要认为它的特定设备。看起来更像是 api 的东西
  • Android OS (oreo) 中的相同问题
  • 我知道。奥利奥也值得一个解决方案=]

标签: android icons appicon


【解决方案1】:

将 mipmap 内容移出项目
然后使用 Asset studio 创建应用程序图标(右键单击项目面板 > 新建 > 图像资源)
并像这样在清单中设置图标:

  <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">

【讨论】:

  • 感谢您的回复,但我认为这是我现在正在做的事情,但仍然无法正常工作。
【解决方案2】:

清单:

<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">

短片:

mipmap-anydpi-v26

@drawwable/invitation 图标之后找到此文件夹

res/drawable-xhdpi

查找此文件夹的 @mipmap/ic_invitation_maker 图标

mipmap-hdpi

【讨论】:

    猜你喜欢
    • 2017-03-17
    • 2018-07-31
    • 1970-01-01
    • 1970-01-01
    • 2022-10-15
    • 1970-01-01
    • 1970-01-01
    • 2011-07-01
    • 1970-01-01
    相关资源
    最近更新 更多