Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/224.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用自适应启动器图标时出现Lint错误_Android_Lint_Adaptive Icon - Fatal编程技术网

Android 使用自适应启动器图标时出现Lint错误

Android 使用自适应启动器图标时出现Lint错误,android,lint,adaptive-icon,Android,Lint,Adaptive Icon,由于我在应用程序中使用了自适应启动器图标,因此在构建应用程序时出现了lint错误 错误:从清单中引用的资源不能因配置而异(版本限定符除外,例如-v21)。在anydpi-v26[ManifestResource]中发现了差异。 android:roundIcon=“@mipmap/ic_launcher_round”se src\main\res\mipmap-anydpi-v26\ic\u launcher\u round.xml:2:将不使用此值 “ManifestResource”类型问题

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

错误:从清单中引用的资源不能因配置而异(版本限定符除外,例如-v21)。在anydpi-v26[ManifestResource]中发现了差异。 android:roundIcon=“@mipmap/ic_launcher_round”se src\main\res\mipmap-anydpi-v26\ic\u launcher\u round.xml:2:将不使用此值 “ManifestResource”类型问题的解释:清单中的元素可以引用资源,但这些资源不能随配置而变化(除了作为特例,按版本,以及一些特定的包属性,如应用程序标题和图标)

我不知道“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>


我有一个调试和发布配置,可以为发布和调试版本使用不同的背景色

你检查过文件
ic\u launcher\u round.xml的内容了吗?我用
ic\u launcher\u round.xml的代码更新了我的问题