android - 在 Image Asset Studio 中创建启动器图标时出现 anydpi-v26 问题

标签 android android-asset-studio

在带有剪贴画的 Image Asset Studio 中创建启动器图标(Adaptive 和 Legacy)时,会在 mipmap 文件夹中创建图像:
enter image description here
但是对于 anydpi-v26,前景的标准图标没有改变,尽管背景颜色发生了变化:
enter image description here
ic_launcher.xml(anydpi-v26):

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
ic_launcher_foreground 文件夹中有两个文件:ic_launcher_foregraund.xml(新图标)和 ic_launcher_foregraund.xml (v24)(标准图标)
为什么他不自动换新图纸?感谢您的任何回答!

最佳答案

我遇到过同样的问题。相同的解决方案。由于某种原因,在创建新的启动器图标时,不会删除可绘制文件夹中的旧文件 ic_launcher_foreground.xml。您最终会得到两个具有相同名称的文件。所以删除它( 没有安全删除 ),解决了这个问题。

关于android - 在 Image Asset Studio 中创建启动器图标时出现 anydpi-v26 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61023038/

相关文章:

android - 将数据传递给 Android Compose 中的前一个可组合对象

android studio 3.5 图像资源启动器图标(仅限旧版本)形状无不工作

java - 对 Android 应用程序进行逆向工程时,Smali 代码与 Java 源代码的对比

android - 为什么不改变 getView() android 中的位置?

Java:Android UI (Android Studio) 和 java 后端(模型)的交互/连接(与 JavaFX 相比)

java - validator ,Java 到 Kotlin 的翻译不正确