从清单中引用的资源不能因配置而异
Resources referenced from the manifest cannot vary by configuration
当我想插入以下元标签时:
<meta-data
android:name="com.android.systemui.action_assist_icon"
android:resource="@mipmap/ic_launcher" />
我收到错误消息:
Resources referenced from the manifest cannot vary by configuration
(except for version qualifiers, e.g. -v21.) Found variation in hdpi,
mdpi, xhdpi, xxhdpi, xxxhdpi
我该如何解决这个问题?
AndroidManifest.xml 中的资源变化被检测为错误。
可以这样忽略:
<?xml version="1.0" encoding="utf-8"?>
<manifest ...
xmlns:tools="http://schemas.android.com/tools"
...>
...
<meta-data
android:name="com.android.systemui.action_assist_icon"
android:resource="@mipmap/ic_launcher"
tools:ignore="ManifestResource" />
...
</manifest>
见:
我将此类字符串移至 globalstrings.xml 并从语言环境文件中删除了引用。
当我想插入以下元标签时:
<meta-data
android:name="com.android.systemui.action_assist_icon"
android:resource="@mipmap/ic_launcher" />
我收到错误消息:
Resources referenced from the manifest cannot vary by configuration (except for version qualifiers, e.g. -v21.) Found variation in hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi
我该如何解决这个问题?
AndroidManifest.xml 中的资源变化被检测为错误。
可以这样忽略:
<?xml version="1.0" encoding="utf-8"?>
<manifest ...
xmlns:tools="http://schemas.android.com/tools"
...>
...
<meta-data
android:name="com.android.systemui.action_assist_icon"
android:resource="@mipmap/ic_launcher"
tools:ignore="ManifestResource" />
...
</manifest>
见:
我将此类字符串移至 globalstrings.xml 并从语言环境文件中删除了引用。