0

See the image

Here you can see the icons are not loaded. Can someone please find me a solution.

Code content:

import {Icon, Row} from '@shoutem/ui';

return (
            <View style={styles.container}>
                <NavigationBar title="All Restaurants" />
                <View style={styles.row}>
                <Row styleName="small" >
                    <Icon name="play"/>
                    <Text>About</Text>
                    <Icon styleName="disclosure" name="right-arrow"/>
                </Row>
              </View>
            </View>
        );
PaladiN
  • 4,625
  • 8
  • 41
  • 66
Yadu C
  • 11
  • 2
  • This is problem is quite similar to this issue `https://github.com/shoutem/ui/issues/82`. Suggesting to use `Text` component from **shoutem** rather from **react-naitve** – Neel Gala Mar 08 '17 at 06:01
  • 1
    no, its not working. I have issue with the Icon, not the Text component. – Yadu C Mar 08 '17 at 06:18
  • How do you run project? If you are not using `shoutem` CLI you have to execute `react-native link` command in your project root before running the app. – Mr Br Apr 04 '17 at 09:30

3 Answers3

2

For me this issue occurred because the font files were not in the android/app/src/main/assests/font/ folder inside the root of your react-native directory.

I copied all the font files from this link to shoutem's github (you may also find it inside your-project-directory/node_modules/@shoutem/ui/examples/RestaurentsApp/android/app/src/main/assests/font/) to the above folder and rebuilt the app.

This worked for me, I hope it'll work for you too.

0

Perhaps it's an issue with loading fonts. Could you check @shoutem/ui's Github for similar issues? There is one about icons appearing as Chinese letters. Did you try with other icon names?

airmiha
  • 161
  • 1
  • 2
0

I know I am responding to an old thread, but as it shows up first in Google for I'm sure many people experiencing the same problem will come across this one.

I realized I forgot to run react-native link after npm install @shoutem/ui --save.

Skipping this step caused the fonts and assets (including icons) not to be installed. Running the link command fixed the missing fonts.

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
Bram
  • 1