1
votes

Before installation the react-native-vector-icons, The project is work well.
But ..
When I install the react-native-vector-icons, I can only see the white screen .
It took me two days to solve this problem.
But it doesn't work. I add it like this:

npm install react-native-vector-icons --save
react-native link

Build success and no error or warnning,I compared with npm website,all of the file was the same,like android/app/build.gradle setting.gradle and so on, but it doesn't work in my android phone.
Thx for any help!I'm almost broke.

1
version of React Native?flix
post your stack-traceWitVault

1 Answers

0
votes

You must add below line and run react-native run-android:

Android Option: With Gradle (recommended) This method has the advantage of fonts being copied from this module at build time so that the fonts and JS are always in sync, making upgrades painless.

Edit android/app/build.gradle ( NOT android/build.gradle ) and add the following:

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"