9

This is a fresh React Native app using React Native Paper. I followed the instructions at https://callstack.github.io/react-native-paper/getting-started.html and installed react-native-paper and react-native-vector-icons.

For some reason, none of the icons are showing in the app -- see below: enter image description here

For example, I have a Searchbar at the top of this screen with the following code. As far as I can see, I don't even have to specify an icon there. It should automatically display a magnifying glass but no icon is showing.

<Searchbar placeholder="New to do item..." />

Any idea why and how to fix it?

Sam
  • 26,817
  • 58
  • 206
  • 383
  • 3
    Did you follow https://github.com/oblador/react-native-vector-icons#android? – Sameer Kumar Jain May 13 '20 at 18:01
  • 1
    Yes, this fixed the issue. Thank you! Could you please copy and paste your response as an answer so that you get credit for your help? I'll accept yours as the answer. Thanks again! – Sam May 14 '20 at 04:44

2 Answers2

30

Stop your application. Then go to project directory > open cmd > run npx react-native link react-native-vector-icons

cmd will show you linking is successful

Now run your app again

mayur
  • 301
  • 2
  • 2
2

Just follow the installation steps as described here: https://github.com/oblador/react-native-vector-icons#android

React-native-paper uses MaterialCommunityIcons so remember to add it in the iconFontNames list in the steps above.

Daviskitavi
  • 21
  • 1
  • 3