How to Convert SVG, PSD files to XML in Android Studio?

svg to xml android studio

In this article, we’ll see how to convert SVG and PSD files to XML in Android Studio.

It’s easy to convert the images to XML format. First, open the Android Studio. Right-click on the res folder > New > Vector Asset.

android studio res folder

Select the “Local file (SVG, PSD)” radio button. Next, click on the browse icon and select your image.

android studio vector asset

Click on the “Next” button, then, “Finish” button.

Now, open res > drawable folder. You will find your image in the XML format.

Sometimes, when you open the image, you will get errors (mostly because of color).

android xml errors

There is no currentColor in the project. To fix this, simply set a color.

xml drawable colors

That’s it! This is how you can convert SVG or PSD files to XML format in Android Studio.


Leave a Comment