我试图通过右键单击res
文件夹-> new
->将自定义图标从SVG文件添加到我的Android应用程序Image asset
。我已使用SVG选择了默认选项,但运行该应用程序时看不到该图标。我尝试clean project
在安装它之前也做了一个invalidate 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图标。
我在这里想念什么吗?我还有什么需要做的吗?
谢谢!
好吧,最后,我只是从PNG(而不是SVG)创建了图标,并且效果很好。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句