Unrecognized Font Family on React Native

前端 未结 5 1290
春和景丽
春和景丽 2021-02-11 01:57

I\'m running into a peculiar error using React Native. Inside my button.js I am doing

import Icon from \"react-native-vector-icons/MaterialIcons\";         


        
5条回答
  •  星月不相逢
    2021-02-11 02:32

    The library you use has a specific section about this problem, it states (in version 2.0.3):

    • Make sure you've added the fonts to your XCode project.
    • Check that the font you are trying to use appears in Info.plist, if you've added the whole folder and it's blue in color, then you need to add it to the path.
    • Check that the font is copied in the Copy Bundle Resources in Build Phases.
    • Recompile the project.

提交回复
热议问题