android – 为什么我的SVG无法在Vector Asset Studio中加载

前端之家收集整理的这篇文章主要介绍了android – 为什么我的SVG无法在Vector Asset Studio中加载前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
以下SVG无法在 Android Studio的Vector Asset Studio中打开,导致错误

“空预览图!
解析TareSymbol.svg中的EXCEPTION:
输入字符串:“8.7337904mm”解析XML文件时异常:
档案过早结束.

为什么以下SVG文件与Vector Asset Studio不兼容?

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <svg
  3. xmlns:dc="http://purl.org/dc/elements/1.1/"
  4. xmlns:cc="http://creativecommons.org/ns#"
  5. xmlns:rdf="http://www.w3.org/1999/02/22-rdf-Syntax-ns#"
  6. xmlns:svg="http://www.w3.org/2000/svg"
  7. xmlns="http://www.w3.org/2000/svg"
  8. version="1.1"
  9. id="svg20235"
  10. viewBox="0 0 61.500162 30.946501"
  11. height="8.7337904mm"
  12. width="17.356712mm">
  13. <defs
  14. id="defs20237" />
  15. <Metadata
  16. id="Metadata20240">
  17. <rdf:RDF>
  18. <cc:Work
  19. rdf:about="">
  20. <dc:format>image/svg+xml</dc:format>
  21. <dc:type
  22. rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  23. <dc:title></dc:title>
  24. </cc:Work>
  25. </rdf:RDF>
  26. </Metadata>
  27. <g
  28. transform="translate(-109.24987,-351.17467)"
  29. id="layer1">
  30. <path
  31. d="m 145.03542,367.34167 10.897,-4.49325 -0.009,3.30587 13.69124,0.0372 1.13537,0 0,2.1285 -1.13537,0 -13.69662,-0.0373 -0.009,3.33988 -10.87325,-4.281 z m -13.38814,-13.15875 0,-3.00825 16.97389,3.00825 -6.8995,27.93825 -3.15214,-27.93825 -6.92225,0 z m 3.31725,13.15875 -10.897,4.49325 0.009,-3.3055 -13.69129,-0.0373 -1.13537,-2.1285 1.13537,0 13.69662,0.0372 0.009,-3.33988 10.87325,4.28063 z"
  32. style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
  33. id="path20212" />
  34. </g>
  35. </svg>

解决方法

您需要将svg的宽度和高度从mm更改为使用px.当问题得到解决时,这是当前的解决方法.

已经有一个提交的错误报告here

希望有帮助.

猜你在找的Android相关文章