AnimatedVectorDrawable in Support Library and animation of "pathData"
<p>I am using <strong>animated vectors</strong> from <strong>Support Library 23.2.0</strong>, like this:</p>

<pre><code>compile 'com.android.support:support-vector-drawable:23.2.0'
compile 'com.android.support:animated-vector-drawable:23.2.0'
</code></pre>

<p>I am trying to animate "<strong>pathData</strong>" (morphing lines one to another). My code looks like this.</p>

<p>drawable/ic_done.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0"&gt;
    &lt;path
        android:name="tick"
        android:pathData="M4.8,12L9,16.2L20,8"
        android:strokeColor="#FF000000" /&gt;
&lt;/vector&gt;
</code></pre>

<p>drawable/ic_done_animated.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:drawable="@drawable/ic_done"&gt;
    &lt;target
        android:name="tick"
        android:animation="@animator/tick_path_animation" /&gt;
&lt;/animated-vector&gt;
</code></pre>

<p>animator/tick_path_animation.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
    android:ordering="sequentially"&gt;
    &lt;objectAnimator
        android:duration="200"
        android:propertyName="pathData"
        android:valueFrom="M4.8,12L4.8,12L4.8,12"
        android:valueTo="M4.8,12L9,16.2L9,16.2"
        android:valueType="pathType" /&gt;
    &lt;objectAnimator
        android:duration="200"
        android:propertyName="pathData"
        android:valueFrom="M4.8,12L9,16.2L9,16.2"
        android:valueTo="M4.8,12L9,16.2L20,8"
        android:valueType="pathType" /&gt;
&lt;/set&gt;
</code></pre>

<p>Java code:</p>

<pre><code>ImageView vImgAnimated = findByViewId(R.id.img);
AnimatedVectorDrawableCompat animatedVector = AnimatedVectorDrawableCompat.create(getContext(), R.drawable.ic_done_animated);
vImgAnimated.setImageDrawable(animatedVector);
animatedVector.start();
</code></pre>

<p>It works well on newer device with <strong>API level 21</strong> but I have a problem on device with <strong>API level 16</strong>:</p>

<pre><code>java.lang.NumberFormatException: Invalid int: "M4.8,12L4.8,12L4.8,12"
    at java.lang.Integer.invalidInt(Integer.java:138)
    at java.lang.Integer.parse(Integer.java:375)
    at java.lang.Integer.parseInt(Integer.java:366)
    at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
    at android.content.res.TypedArray.getInt(TypedArray.java:254)
    at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:258)
    at android.animation.AnimatorInflater.loadObjectAnimator(AnimatorInflater.java:161)
    at android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:117)
    at android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:126)
    at android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:93)
    at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:72)
    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.inflate(AnimatedVectorDrawableCompat.java:377)
    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.createFromXmlInner(AnimatedVectorDrawableCompat.java:162)
    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.create(AnimatedVectorDrawableCompat.java:142)
</code></pre>

<p>According to an article <a href="http://android-developers.blogspot.cz/2016/02/android-support-library-232.html" rel="noreferrer">android-support-library-232</a> the animated vectors (AnimatedVectorDrawableCompat) should be supported back to <strong>API level 11</strong>.</p>

<p>It looks like it fails while reading <strong>valueFrom</strong> attribute from <strong>tick_path_animation.xml</strong>. This attribute type "pathType" is probably not supported (yet?). Any idea how to solve this?</p>