Android Selector Drawable with VectorDrawables srcCompat
<p>I'm facing a problem with the new backward compatibility with VectorDrawables.
In the Support Library 23.2 was a new feature for backward compatibility with Android VectorDrawables indroduced. </p>

<p>I have an ImageView which is a SelectorDrawable assigned to. This Drawable holds several VectorDrawables so I thought I should use app:srcCompat for compatibility. But it does not work on my Galaxy S2 with android 4.1.2.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:drawable="@drawable/ic_gps_fixed_24dp"android:state_activated="true" android:state_selected="true"&gt;&lt;/item&gt;
    &lt;item android:drawable="@drawable/ic_gps_not_fixed_24dp" android:state_activated="true" android:state_selected="false"&gt;&lt;/item&gt;
    &lt;item android:drawable="@drawable/ic_gps_not_fixed_24dp" android:state_activated="false" android:state_selected="true"&gt;&lt;/item&gt;
    &lt;item android:drawable="@drawable/ic_gps_off_24dp" android:state_activated="false" android:state_selected="false"&gt;&lt;/item&gt;
    &lt;item android:drawable="@drawable/ic_gps_not_fixed_24dp"&gt;&lt;/item&gt;
&lt;/selector&gt;
</code></pre>

<p>All drawables are vector xml files.</p>

<p>When using this SelectorDrawable with srcCompat I get this error:</p>

<pre><code>  Caused by: android.content.res.Resources$NotFoundException: File res/drawable/  Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_gps_fixed_24dp.xml from drawable resource ID #0x7f0201c1
                                                                           at android.content.res.Resources.loadDrawable(Resources.java:1951)
                                                                           at android.content.res.Resources.getDrawable(Resources.java:672)
                                                                           at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
                                                                           at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881).xml from drawable resource ID #0x7f0201c1
</code></pre>

<p>using android:src is even worse.</p>

<p>If I use one of the vector drawables with app:srcCompat all works fine. So I guess it's a problem with the SelectorDrawable and compatibility.</p>

<p>Has anyone had the same problem and found a solution or is it currently not possible to use VectorDrawables in SelectorDrawables prior to Android 5?</p>

<p>The Quick Facts:</p>

<ul>
<li>Compile Target API 23 </li>
<li>Support Libraray 23.3.0</li>
<li>vectorDrawables.useSupportLibrary = true </li>
<li>Gradle 2.0</li>
</ul>