0

I've been using react-native-svg and react-native-svg-transformer to render svg files in my app and it's worked fine. However, It didn't work for one specific svg file. The file size is only about 281 kb, while the other worked file size is about 1.61 mb. The fils is supposed to look like this, which has all the color

However, it looks like this, which only shows black

plz help me, thanks!

*metro.config.js code

screenshot of metro.config.js code

*app.js code screenshot of app.js code

*the svg file that works screenshot of the svg file that works

*the svg file that doesn't work screenshot of the svg file that doesn't work

Geek
  • 1
  • 1
  • 1
    You need to present the code you used to help with the problem. – hong developer Sep 23 '19 at 16:39
  • You need to correctly specify the fill attribute in the svg.Try comparing a svg with its equivalent react-native-svg file.I had experienced this before,we can help if we get the svg files. – Thakur Karthik Sep 23 '19 at 17:18
  • Hi guys, I've uploaded the screenshots of the svg files, including the file that works and the one that doesn't work. I've noticed some differences between these two files. However, I'm not sure how to fix it. Thanks again! – Geek Sep 24 '19 at 05:20

0 Answers0