If you’re using Android Studio, the best method is:
- Right-click on your ‘drawable’ folder > New > Vector Asset
- Click ‘Local SVG file’ to import your own SVG file, or ‘Material Icon’ to use the supplied icons.
- Change the resource name to whatever you need it to be.
- Click Next and choose your target modules and res directory.
- Click Finish.
The wizard produces XML from your SVG files.