Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fontFamily 'Material Icons' is not a system font and has not been loaded through Expo.Font.loadAsync #789

Closed
jamesangetonhouse opened this issue Jul 23, 2018 · 8 comments

Comments

@jamesangetonhouse
Copy link

I receiving this error:
the error screen capture

Is this related to the recent update?

I have using this component previously and so far so good until now.
https://github.com/renrizzolo/react-native-sectioned-multi-select/issues/46

@jamesangetonhouse
Copy link
Author

It seems like my mistake.

@matiastoro
Copy link

How did you solve it? I have the same problem

@jamesangetonhouse
Copy link
Author

jamesangetonhouse commented Aug 13, 2018

Hi there,
I have fixed this via trial and error method.
First, I removed all the packages in the npm_modules folder.
Then one by one install back. And it magically fix the issue. I suspect, is due to dependency issues.

@kalifa17
Copy link

@gabriel-TheCode
Copy link

Please what is the real solution ?

@dogaoz
Copy link

dogaoz commented Nov 15, 2019

I have the same problem and no matter what I've done, it still doesn't work. Googled and checked every single github and stack overflow post and I cannot figure out what is wrong.

@dogaoz
Copy link

dogaoz commented Nov 16, 2019

I fixed it with

import FontAwesome from '../node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome.ttf';
import MaterialIcons from '../node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialIcons.ttf';

state = {
    fontLoaded: false
  };
      async componentWillMount() {
        try {
         
      await Font.loadAsync({


        FontAwesome,
        'Material Icons': MaterialIcons


      });

          this.setState({ fontLoaded: true });
        } catch (error) {
          console.log('error loading icon fonts', error);
        }
      }

@huayunh
Copy link

huayunh commented Jan 30, 2020

^ this trick actually solved my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants