Android: Convert SVG to VectorDrawable (via Vector Asset Studio)

Android’s VectorDrawable lets your icons scale cleanly across densities. In this guide, you’ll export a clean/minified SVG from Axialis IconVectors, import it with Vector Asset Studio, and optionally generate PNG fallbacks for older targets.
Prep your SVG for Android
- Open or create your icon in IconVectors:
- File → Open… (Ctrl+O) or New Icon (Ctrl+N).
- Design on a square grid (e.g., 24×24) and keep shapes crisp at small sizes.
Keep it simple: paths and strokes are fine; avoid filters, masks, and heavy effects. - Flatten & simplify (as needed)
- Remove filters/masks/clipping. Vector Asset Studio imports a subset of SVG.
- If you used complex strokes (dashes, wide outlines), consider converting them to filled paths for predictable results.
- Ensure the root has a clean
viewBox
(e.g.,0 0 24 24
).
- Export Minified SVG
Choose File → Export → Export Minified (Shift+Ctrl+M) and save
ic_check_24.svg
. This strips metadata and preserves the geometry.
Import with Vector Asset Studio (Android Studio)
- Open Vector Asset Studio
- Resource Manager → + → Vector Asset, then pick Local file (SVG) and select your exported SVG.
- Or use File → New → Vector Asset from the Project view.
- Review the preview & name
- Set a descriptive name (e.g.,
ic_check_24
) and verify the tint/fill if you rely on a single color. - Fix warnings: simplify gradients, remove unsupported attributes, or re‑export with strokes outlined.
- Set a descriptive name (e.g.,
- Finish to generate a VectorDrawable
Android Studio creates
res/drawable/ic_check_24.xml
. A minimal VectorDrawable looks like this:<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#000" android:pathData="M4,12 L9,17 L20,6" android:strokeColor="#000" android:strokeWidth="2" android:fillAlpha="0" /> </vector>
Use the drawable in layouts
- ImageView:
<ImageView android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/ic_check_24" />
- Tint with theme color (Material):
<ImageView android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/ic_check_24" android:tint="?attr/colorPrimary" />
Optional: PNG fallbacks
- If you support very old devices or specific toolchains, export small PNG sizes from the same SVG via File → Export → Export to Multiple Bitmaps (Shift+F3) and place them under density folders (e.g.,
mipmap-
ordrawable-
). - Keep the vector as the primary asset; use PNGs only where strictly required.
Start Making SVG Icons Today with IconVectors
Download the fully-functional 30‑Day Free Trial and unlock your icon design workflow.
Version 1.10 - September 17, 2025