android - @mipmap/ic_launcher 未用于应用程序图标
问题描述
我正在更改应用程序启动器图标并使用说明res/mipmap/ic_launcher
修改了图标。在 Android Studio 中,我看到了正确的修改图标。
但是,设备上仍显示原来的默认图标,而不是我绑定的新图标ic_launcher
。我的清单使用指向新值 AFAICT。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.anytune.rxsongbrowsertrials">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
....
</manifest>
为什么不使用ic_launcher
图标?
解决方案
我发现了错误。使用Image Asset Studio工具,它在 ic_launcher 资源中为普通 (res/mipmap/ic_launcher) 和圆形版本 (res/mipmap/ic_launcher_round) 版本创建了我的新启动图标,分辨率如下:dpi, dpi, xhdpi, xxhdpi, xxxhdpi
. 这些都是 png 文件,所以这些文件可能仍然有问题,因为我希望它们是 .xml 文件。
但是,它没有更新该anydpi-v26
决议。这仍然是指带有模板图像的原始可绘制对象。我需要手动更新前景标签以使用我的新可绘制对象。
推荐阅读
- sapui5 - Smartfield - 控制类型下拉列表 - 将参数发送到 OData
- flutter-dependencies - 颤振网页应用
- docker - 如何在 VS2019 中调试 Docker 容器
- angular - 如何修复 Angular scss ModuleBuild 错误
- xamarin.forms - Xamarin 表单 || 将相机源流式传输到 Web API
- ruby - phusion 乘客中的乘客最大请求队列大小在哪里
- jquery - 根据多个下拉选择从对象中获取相应的值
- kubernetes - Kubernetes image_pull_secrets 只使用来自同一命名空间的秘密,有没有其他方法不需要为所有命名空间创建秘密?
- excel - 计算文档中的行数,然后在另一个 excel 文件上打印该数字
- vba - eprime/vba 4个属性的最高值