在新的 Android 上删除旧的应用程序图标

问题描述 投票:0回答:1

不久前,我制作了一个简单的 Android 应用程序 - 一个上传数据的共享意图处理程序。

现在我为它设计了一个新的 SVG 图标,以矢量图形导入到项目中,然后使用 InkScape 转换为一系列 PNG,并替换了项目中的所有 PNG。

应用程序现在显示并带有新图标

  • Android 4.3(SGS3,库存固件)
  • 和 Android 7.1(SGS2、LineageOS)

但 Android 11(API 级别 30、三星 Galaxy A50、库存固件)仍显示旧图标。

应用程序中没有更多位置可以放置默认图标(带耳朵的绿色机器人头)!!!

当某些预期资源丢失时,可能会显示默认图标?

我用以下文件中的新图像替换了图像:

  • 应用\src\main es\drawable-v24\ic_launcher_foreground.xml
  • 应用\src\main es\mipmap-hdpi\ic_launcher.png
  • 应用\src\main es\mipmap-mdpi\ic_launcher.png
  • 应用\src\main es\mipmap-xhdpi\ic_launcher.png
  • 应用\src\main es\mipmap-xxhdpi\ic_launcher.png
  • 应用\src\main es\mipmap-xxxhdpi\ic_launcher.png
  • 应用\src\main es\mipmap-hdpi\ic_launcher_round.png
  • 应用\src\main es\mipmap-mdpi\ic_launcher_round.png
  • 应用\src\main es\mipmap-xhdpi\ic_launcher_round.png
  • 应用\src\main es\mipmap-xxhdpi\ic_launcher_round.png
  • 应用\src\main es\mipmap-xxxhdpi\ic_launcher_round.png

我注意到

ic_launcher_foreground.xml
文件夹中没有
app\src\main\res\drawable\
,只有
app\src\main\res\drawable-v24\
中。这正常吗?

我的

app\src\main\res\mipmap-anydpi-v26\ic_launcher.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/ic_launcher_foreground" />
</adaptive-icon>

当我在 Android Studio 中按住 Ctrl 键并单击

@drawable/ic_launcher_foreground
时,它会将我引导至
app\src\main\res\drawable-v24\ic_launcher_foreground.xml

android icons
1个回答
1
投票

您应该尝试添加来自

的图标

res -> 可绘制 -> 右键单击 -> 新建 -> 添加图像资源 -> 启动器图标

更改您的启动器图标,它应该在任何地方都能正确可见。

© www.soinside.com 2019 - 2024. All rights reserved.