AndroidStudio使用ERROR @< mask>导入SVG.不支持 [英] AndroidStudio import SVG with ERROR@ <mask> is not supported
问题描述
尝试使用SVG导入时收到消息"ERROR@ <mask> is not supported"
Android Studio 3.0.1
Build #AI-171.4443003, built on November 10, 2017
JRE: 1.8.0_152-release-915-b08 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
是否可以导入SVG并使其正确显示?
解决方案1
素描中的平面图像,并使用
我在Sketch中打开了SVG图标,并检查了图标顶部的孔.如预期的那样,它使用fill-rule:evenodd属性.现在,我必须更改填充规则以使用"nonzero"属性.如何?选择路径.右侧的填充"属性中有一个设置图标.单击它,然后选择非零". 从主菜单中选择图层"→路径"→逆序".我在图标顶部又找到了一个漏洞,并且在应用程序中也有一个漏洞. I got message Anyway to import SVG and make them show correctly? Solution 1 Flattern image in Sketch and use this site to convert SVG to xml for Android Solution 2 I use nonZero instead of evenOdd and open it in Sketch to reverse Order after reverse it will change pathData and remove android:fillType and everything work fine on Android 21+. Solution 3 PNG TLDR After some research I found that there are two fill-rule property methods for Vector graphics, SVGs, the "evenodd" vs "nonzero" I opened the SVG icon in Sketch and inspected the hole at the top of the icon. As expected it uses fill-rule:evenodd property. Now I have to change the fill-rule to use "nonzero" property. How? Select the path. In the right side, there is a settings icon at the "Fills" property. Click it and choose "non-zero". From the main menu, choose Layer → Paths → Reverse Order. I got the hole back at the top of the icon and got the hole in the app, too. 这篇关于AndroidStudio使用ERROR @< mask>导入SVG.不支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!"ERROR@ <mask> is not supported"
when try to import SVG using Android Studio 3.0.1
Build #AI-171.4443003, built on November 10, 2017
JRE: 1.8.0_152-release-915-b08 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6