Reputation: 433
I was working on a project of mine and had just asked android studio to update it from gradle version 2.3.3 to 3.0.1. I looked up a couple of sites including this https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html
However, as instructed on the above link, I modified my themes.xml file from
<item name="attr/color_text_primary">@color/white</item>
to
<item type="attr" name="color_text_primary">@color/white</item>
However, now android studio is showing an error at @color/white as:
Unexpected resource type; expected value of type @attr/
I am not sure what is the error. I have followed what is written in the above link. Can someone please help. TIA
My attrs.xml has:
<attr name="color_text_primary" format="reference|color" />
My colors.xml:
<color name="white">#ffffffff</color>
Upvotes: 2
Views: 1000
Reputation: 3
The error is self-explanatory. You are saying that item is "attr", but it's "color". Should be:
<item type="color" name="color_text_primary">@color/white</item>
Upvotes: 1