title: VectorDrawable: Invalid drawable tag gradient
body: <p>I have been using the Android Asset Studio to generate vector drawables from SVG files exported from Zeplin for a while and except a few times, it works fine. But today I got this exception when I was trying to use a generated vector drawable. </p>
  
  <pre><code>android.view.InflateException: Binary XML file line #0: Error inflating class &lt;unknown&gt;
  </code></pre>
  
  <p>And in the same stacktrace:</p>
  
  <pre><code>Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #0: invalid drawable tag gradient
  </code></pre>
  
  <p>I do not know a lot about Vector drawables and SVGs in Android. Are gradients not supported in Vector drawables? Is there any fix for this issue or do I need to use PNGs?</p>
  
  <p>I am using Support Library version:</p>
  
  <blockquote>
    <p>com.android.support:support-v4:26.1.0</p>
  </blockquote>
  
  <p>I am using </p>
  
  <blockquote>
    <p>Android Studio 3.0</p>
  </blockquote>
  
  <p>Here is the VectorDrawable file generated by Android Asset Studio:</p>
  
  <pre><code>&lt;vector 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:aapt="http://schemas.android.com/aapt"
      android:width="360dp"
      android:height="110dp"
      android:viewportWidth="360.0"
      android:viewportHeight="110.0"&gt;
      &lt;path
          android:pathData="M82,46H0v64h360V46h-81.88v-0.3h-26.21c-14.25,0 -38.69,-6.2 -46.95,-25.93C200.99,10.25 193.27,0.52 180,0.47c-13.27,-0.05 -20.04,9.24 -24.75,19.3 -8.22,17.55 -24.66,26.19 -49.34,25.93H82V46z"
          android:fillType="evenOdd"&gt;
          &lt;aapt:attr name="android:fillColor"&gt;
              &lt;gradient 
                  android:startY="0.41999998688697815" 
                  android:startX="0.0" 
                  android:endY="110.0" 
                  android:type="linear" 
                  android:endX="360.0"&gt;
                  &lt;item android:offset="0.0" android:color="#FFCB09FF" /&gt;
                  &lt;item android:offset="1.0" android:color="#FF8A06FF" /&gt;
              &lt;/gradient&gt;
          &lt;/aapt:attr&gt;&lt;/path&gt;
  &lt;/vector&gt;
  </code></pre>
  
  <p>Link to original SVG file: <a href="https://drive.google.com/file/d/1Lj62xJv5IpYR5Lle7w1kMsFXh6y5PijK/view?usp=sharing" rel="noreferrer">https://drive.google.com/file/d/1Lj62xJv5IpYR5Lle7w1kMsFXh6y5PijK/view?usp=sharing</a></p>
  
  <p>SVG contents when opened on Sublime:</p>
  
  <pre><code>&lt;svg xmlns="http://www.w3.org/2000/svg" width="360" height="110" viewBox="0 0 360 110"&gt;
      &lt;defs&gt;
          &lt;linearGradient id="a" x1="0%" y1="0%" y2="100%"&gt;
              &lt;stop offset="0%" stop-color="#CB09FF"/&gt;
              &lt;stop offset="100%" stop-color="#8A06FF"/&gt;
          &lt;/linearGradient&gt;
      &lt;/defs&gt;
      &lt;path fill="url(#a)" fill-rule="evenodd" d="M82 46H0v64h360V46h-81.876v-.299h-26.208c-14.25 0-38.69-6.198-46.946-25.93C200.99 10.252 193.27.52 180 .474c-13.27-.047-20.04 9.238-24.75 19.295-8.217 17.55-24.662 26.194-49.336 25.931H82V46z"/&gt;
  &lt;/svg&gt;
  </code></pre>