0

由于我为我的应用程序使用了自适应启动器图标,因此在构建我的应用程序时出现 lint 错误。

错误:清单中引用的资源不能因配置而异(版本限定符除外,例如 -v21。)在 anydpi-v26 [ManifestResource] 中发现了变化 android:roundIcon="@mipmap/ic_launcher_round"se src\main\res\mipmap-anydpi-v26\ic_launcher_round.xml:2: This value will not be used for questions of type "ManifestResource": Elements in the manifest can reference资源,但这些资源不能因配置而异(除了作为特殊情况,按版本,除了一些特定的包属性,如应用程序标题和图标。)

我不知道“android:roundIcon='@mipmap/ic_launcher_round'se”中的“se”来自哪里,如果这是问题。

我正在使用 Android Studio 3.1.3(也尝试过使用早期版本 3.1.2)

谁能告诉我我做错了什么或问题出在哪里?

更新 我的 ic_launcher_round.xml 看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

我有一个调试和发布配置,可以为发布和调试构建使用不同的背景颜色。

4

0 回答 0