I got message import SVG with ERROR@ <feGaussianBlur> is not supported

Viewed 2869

Android Studio send me message "ERROR@ <feGaussianBlur> is not supported" and "ERROR@ <filter> is not supported" when i try import SVG to xml!

I using Inkscape to make and edit SVG file. any solution?

UPDATE

Android Studio 3.4.0

vector xml code:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="120dp"
    android:height="70dp"
    android:viewportWidth="120"
    android:viewportHeight="70">
  <path
      android:pathData="m29.87,5.114h81.925c2.212,0 3.312,1.83 2.467,4.104l-19.088,51.359c-0.845,2.274 -3.306,4.104 -5.518,4.104L7.731,64.681c-2.212,0 -3.312,-1.83 -2.467,-4.104L24.352,9.218c0.845,-2.274 3.306,-4.104 5.518,-4.104z"
      android:strokeWidth="0.43320084"
      android:fillColor="#000000"
      android:strokeColor="#00000000"
      android:fillAlpha="1"/>
  <path
      android:pathData="m29.87,4.585h81.925c2.212,0 3.312,1.83 2.467,4.104L95.174,60.048c-0.845,2.274 -3.306,4.104 -5.518,4.104L7.731,64.152c-2.212,0 -3.312,-1.83 -2.467,-4.104L24.352,8.689c0.845,-2.274 3.306,-4.104 5.518,-4.104z"
      android:strokeWidth="0.43320084"
      android:fillColor="#aaffaa"
      android:strokeColor="#00000000"/>
</vector>

error message:

ERROR @line 28: is not supported

ERROR @line 36: is not supported

1 Answers

<filter> and feGuaussianBlur> are SVG filter elements. They add bitmap filter effects to SVG elements.

Android VectorDrawables do not support SVG filters.

  • If you can live without the filter effect (the blur), then edit your SVG file and remove it/them. Then try importing again.

  • If you need the blur effect, then you won't be able to use a VectorDrawable. You will be forced to use a bitmap image instead.

Related