NativeBase: Icons is not showing
Icons is not showing it shows something like this ▯ only.
react-native: 0.60.4
native-base: 2.12.2
I tried npm install --save react-native-vector-icons but nothing changed 😕
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 20 (1 by maintainers)
I found the solution https://github.com/oblador/react-native-vector-icons/issues/661#issuecomment-378546936
just add this code to
app/build.gradleapply from: "../../node_modules/react-native-vector-icons/fonts.gradle"At this moment, auto linking for react-native-vector-icons in react native 0.60 isn’t working. You can copy the fonts manually or here’s another solution that worked for me:
1.) Uninstall react-native-vector-icons using npm or yarn
2.) cd into your ios folder and rerun pod install
3.) Reinstall react-native-vector-icons using npm or yarn and link the icons manually
4.) Restart your simulators for good measure and rerun your app
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"wasn’t working for me.I had to copy all the font files from
node_modules/native-base/Fontstoandroid/app/src/main/assets/fonts.I confirm that
react-native-vector-iconsis not working in auto-linking mode for react-native 0.61.1. In addition to @tomchomiak answer, you have to create react-native.config.js file with the following content:Had the same problem with
native-base v2.15.0and these dependencies:"react": "16.13.1""react-native": "0.63.4"Adding this code mentioned up there
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"in android/app/build.gradle solved it!It’s working Guys. thanks.
what about expo… @khasky will this work with expo
@mufaddalhamidofficial In the root folder of your app