Android Vector Drawable <text> not support, <tspan> not support
In Adobe XD
- Select text
- Go to
Object
->Path
->Convert to Path
.
OR Select text and CTRL
+ 8
for Windows or ⌘
+ 8
for macOS
When I had the same issue, I used the free online converter CloudConvert, to convert my SVG to another SVG, with marking their setting Text To Path
to yes
, where the converted SVG got opened in my Android Studio like a charm.
If anyone got here because their Inkscape SVG with text imported into Android produced same error (and didn't show text), then be sure in Inkscape to convert the text to path using "Object to path" menu:
- [In Inkscape] Select text block.
- [In Inkscape] Menu "Path | Object To Path"
- Save as "Inkscape SVG"
- [Android Studio] Import SVG ("Right-click on app/res/drawable" | "New Vector Asset" and select file saved in (3).