1

I'm getting a lot of lint errors in Android Resources Validation. It looks like all of them are inside resources that are in my flavors rather than the main app. An example would be:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:state_pressed="true" >
        <shape android:shape="rectangle"  >
            <corners android:radius="2dip" />
            <stroke android:width="4dip" android:color="#FFFFFF" />
            <solid android:color="@color/brand_secondary"/>
        </shape>
    </item>
    <item android:state_focused="true">
        <shape android:shape="rectangle"  >
            <corners android:radius="2dip" />
            <stroke android:width="4dip" android:color="#FFFFFF" />
            <solid android:color="@color/brand_secondary"/>
        </shape>
    </item>
    <item >
        <shape android:shape="rectangle"  >
            <corners android:radius="2dip" />
            <stroke android:width="4dip" android:color="#FFFFFF" />
            <solid android:color="@color/brand_secondary_accent"/>
        </shape>
    </item>
</selector>

In this XML all the @color/ references are underlined as errors -    Cannot resolve symbol '@color/brand_secondary' (at line 7)

I know it's not a big deal and I can ignore those, however maybe someone knows a way of setting up link to either ignore those or figure them out? Would be good to figure these false positives out.

vkislicins
  • 3,331
  • 3
  • 32
  • 62

0 Answers0