React Native. Error: The file name must end with .xml or .png

Viewed 1337

I know that there were similar questions, but all of them didn't help. I generate signed apk for the first time, and I get error:

/android/app/build/generated/res/react/release/drawable-mdpi/src_images_cancel.svg: Error: The file name must end with .xml or .png

As I understand, Android doesn't support svg. I didn't put any svg to drawable-mdpi. I suppose that some library did it. Moreover, when I remove those svgs from the folder, those files are generated again when I generate apk (I do it using android studio).

As I do it in the first time, I can't understand what to do. When I use emulator, I haven't got the same error, I do not get any errors at all. It seems, that some package uses those files, but how to understand which one?

1 Answers

you need to store them into drawable-nodpi and use filename-suffix .xml.

it's alike a common drawable with vector and path.

Related