iT邦幫忙

0

[Android Studio] 匯入向量圖檔 .svg 時出現錯誤 <text> is not supported 的解決方式

今天因應工作上的需求
在專案中匯入 .svg 的向量圖檔
卻出現了以下錯誤畫面
https://ithelp.ithome.com.tw/upload/images/20201202/20107165dg91FSFly4.png
https://ithelp.ithome.com.tw/upload/images/20201202/20107165AJhaeNuqP4.png

這才發現原來這張 .svg 圖檔的內容是由文字組成,而 Android Studio 不支援

所以我們要如何解決呢,請大家 Follow 以下步驟

  1. 開啟 SVG Converter
  2. 上傳檔案並按下"小板手"
    https://ithelp.ithome.com.tw/upload/images/20201202/20107165wtGjJZNUMV.png
  3. 將 Text To Path 的 Yes 打勾
    https://ithelp.ithome.com.tw/upload/images/20201202/20107165feTVguDEFf.png
  4. 按下 Convert
    https://ithelp.ithome.com.tw/upload/images/20201202/20107165SHxafEFn4i.png
  5. 檔案轉完就可以 Download 囉
    https://ithelp.ithome.com.tw/upload/images/20201202/20107165UCynvgvH8d.png
  6. 回到 Android Studio 重新匯入下載下來的 .svg 圖檔,應該是沒有問題的囉!!
    https://ithelp.ithome.com.tw/upload/images/20201202/20107165QODvHBatSD.png

如果喜歡我的文章
還請您多多支持我
分享更多 Android 的小知識給大家
Buy Me a Coffee


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言