我有一个PNG,我是在photoshop中使用图标和一些文本的PNG制作的。我在将其从Sketch或Photoshop导出为SVG时遇到问题,当尝试导入时,我在草图中使用复制SVG代码直接获取SVG时得到Error: No vector content found
;
<svg width="150px" height="161px" viewBox="0 0 150 161" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Login" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Login---no-data" transform="translate(-105.000000,-150.000000)">
<image id="Logo" x="105" y="150" width="150" height="161" xlink:href="data:image/png;base64,iVBORw0KGgoaAAANSUhEUg.....TkSuQmCC"></image>
</g>
</g>
</svg>
还有来自Photoshop的
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="238" height="252" viewBox="0 0 238 252">
<image id="Gradient_Fill_1" data-name="Gradient Fill 1" width="238" height="252" xlink:href="data:img/png;base64,iVBORw0KGgoaAAAN.....U5ErkJggg=="/>
</svg>
(我已经缩短了href的两个数据,以避免大量)
这两个都给出相同的错误。这里出了什么问题,我尝试过使用在线转换将PNG转换为SVG,但仍然遇到了同样的问题。我假设android studio不支持xlink:href=...
,如果是这种情况,我该如何将其展平为路径(猜猜这就是我要做的)。