我正在尝试通过右键单击res
文件夹 -> new
->将 SVG 文件中的自定义图标添加到我的 Android 应用程序Image asset
。我使用我的 SVG 选择了默认选项,但在运行应用程序时看不到图标。clean project
我在安装它之前尝试过 ainvalidate cache and restart
并且结果是一样的。
我还意识到它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>
单击@drawable/ic_launcher_foreground
我到达要打开的位置时:drawable
和drawable-24
。第一个显示了我最近更新的图标,但drawable-24
显示了我在安装我的应用程序时看到的默认 Android 图标。
我在这里有什么遗漏吗?我还有什么需要做的吗?
谢谢!