Closed Amr-A-AdbElBaky closed 1 week ago
SVG support isn't implemented for Android because it doesn't support SVG natively. The main focus of this support is desktop-only and desktop/web applications.
For Multiplatform projects with Android target, XML vector drawables should be used.
Supporting SVG for Android isn't trivial, but possible. Let's keep this issue open.
Coil is using this library to render svg on Android https://github.com/BigBadaboom/androidsvg Maybe you can add something similar to it to the resources library just for android.
That library seems abandoned
Why close this? Igor asked to keep the issue open
Side note by @nickbutcher: https://medium.com/androiddevelopers/understanding-androids-vector-image-format-vectordrawable-ab09e41d5c68
If you’ve ever worked with vector image formats, you’ll likely have come across the SVG format (Scalable Vector Graphics), the industry standard on the web. It is capable and mature with established tooling, but it’s also a vast standard. It includes many complex capabilities like executing arbitrary javascript, blur and filter effects or embedding other images, even animated gifs. Android runs on constrained mobile devices so supporting the entirety of the SVG spec wasn’t a realistic goal.
SVG does however include a path spec which defines how to describe and draw shapes. With this API you can express most vector shapes. This is essentially what Android supports: SVG’s path spec (plus a few additions).
Describe the bug App Crash: java.lang.IllegalStateException: Android platform doesn't support SVG format.
Affected platforms
Versions