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)

Most upvoted comments

I found the solution https://github.com/oblador/react-native-vector-icons/issues/661#issuecomment-378546936

just add this code to app/build.gradle apply 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

npm uninstall react-native-vector-icons --save

2.) cd into your ios folder and rerun pod install

cd ios
pod install
cd ../

3.) Reinstall react-native-vector-icons using npm or yarn and link the icons manually

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

4.) Restart your simulators for good measure and rerun your app

react-native run-ios
react-native run-android

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/Fonts to android/app/src/main/assets/fonts.

I confirm that react-native-vector-icons is 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:

module.exports = {
  dependencies: {
    'react-native-vector-icons': {
      platforms: {
        android: null
      }
    }
  }
};

Had the same problem with native-base v2.15.0 and 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!

I found the solution oblador/react-native-vector-icons#661 (comment)

just add this code to app/build.gradle apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

It’s working Guys. thanks.

what about expo… @khasky will this work with expo

@mufaddalhamidofficial In the root folder of your app