Android Vector Drawable not support. How to fix it?

后端 未结 2 1820
执笔经年
执笔经年 2021-02-19 05:16

| got this error when try to generate a vector asset from local svg files from AndroidStudio 2.2, Ubuntu 14.04

Could not generate a preview
In icon.svg
ERROR@ li         


        
2条回答
  •  萌比男神i
    2021-02-19 05:34

    Your SVG uses a and, to make the faint shadow, it uses an SVG filter (). Neither of these are supported by VectorDrawables. So any solution would involve removing those.

    It looks like the file was created in Sketch. You can try removing those items in Sketch and trying the import again.

    If that still doesn't work then you may have to manually fix the other element that is not supported by the importer: . The good news is that it is easy to work around.

    I've included a manually edited version of the file below that fixes those three issues. It should import into Android Studio okay, but I don't know whether it meets your aesthetic needs or not.

    
    
        
        3765E978-B278-427B-8571-70DE79D99C8A
        Created with sketchtool.
        
            
                
                    
                        
                            
                        
                    
                
            
        
    

提交回复
热议问题