react-native-vector-icons: Icons not being displayed

Hi,

I’m trying to use xotahal/react-native-material-ui module but icons doesn’t seem to work. I’m opening the issue here, because I can’t make icons appear even when using basic example:

import Icon from 'react-native-vector-icons/FontAwesome'; const myIcon = (<Icon name="rocket" size={30} color="#900" />)

I’ve checked all steps of installation guide and everything seems to be correct, I’ve also tried steps from troubleshooting, but still nothing. It looks like the icon is being rendered because if I add the onPress prop it will be activated properly, but icon is not displayed and I can’t see it.

Could you please help me find out what could be causing this problem?

Environment details:

  • Windows 10
  • Android 4.1.2 (testing on real device)
  • React Native 0.43
  • react-native-vector-icons 4.1.0

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17

Most upvoted comments

Hi, I spent so many hours and found the answer here #https://github.com/GeekyAnts/NativeBase/issues/138 Run react-native link & then react-native run-android

After several desperate tries of removing and reinstalling node_modules and running react-native run-android I can finally see icons. 😄

Once after installing the module, link it to the project.

react-native link react-native-vector-icons

write this command

react-native link

this command will download fonts of react native vector icons in both of android and ios then the icons will show

On Sat, Nov 2, 2019 at 11:58 AM faysalJadoon notifications@github.com wrote:

Hello, I tried all the above solutions but it doesn’t work for me. I am using react native .64. Can anyone help me out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/oblador/react-native-vector-icons/issues/463?email_source=notifications&email_token=AH6T4I6LVJASFTJN574Q7XDQRVFM3A5CNFSM4DKJLOUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC4YH4I#issuecomment-549028849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH6T4I3LS3LEI3QLIBBR2F3QRVFM3ANCNFSM4DKJLOUA .

Hi, I spent so many hours and found the answer here #GeekyAnts/NativeBase#138 Run react-native link & then react-native run-android

God bless u man