Resources references from the manifest cannot vary by configuration

Following a tutorial and yet getting an error entering data into AndroidManifest.xml. Code entered was

<meta-data
                android:name="com.google.android.wearable.watchface.preview"
                android:resource="@mipmap/ic_launcher" />

Error was showing on ‘@mipmap/ic_launcher’.

It appears to be a bug and the solution was to create a file called lint.xml and to place it in the app directory. I couldn’t find a way to do this in Android Studio so closed and created it with notepad. Contents of file:

<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="ManifestResource" severity="ignore" />
</lint>

 

This entry was posted in Android. Bookmark the permalink.

2 Responses to Resources references from the manifest cannot vary by configuration

  1. Bernd Kampl says:

    Thanks for this blog entry! I had the same bug when using the new API 25 android:roundIcon. I solved it by adding tools:ignore=”ManifestResource” to the -Tag.

  2. wpadmin says:

    Yours may be the nicer solution, Bernd.

Leave a Reply

Your email address will not be published. Required fields are marked *