Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resources referenced from the manifest cannot vary by configuration

When I want to insert the follow meta-tag:

<meta-data
        android:name="com.android.systemui.action_assist_icon"
        android:resource="@mipmap/ic_launcher" />

I get the error message:

Resources referenced from the manifest cannot vary by configuration (except for version qualifiers, e.g. -v21.) Found variation in hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi

How can I fix this?

like image 592
Julian Schmuckli Avatar asked Jul 17 '16 16:07

Julian Schmuckli


1 Answers

Variation of resources in AndroidManifest.xml is detected as error.

It may be ignored like this:

<?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>

see: Android : Facebook app id showing error in values-ta/strings.xml and can't able to generate signed apk

like image 91
nshmura Avatar answered Nov 15 '22 12:11

nshmura