React native 无法识别的字体族材质图标?

React native 无法识别的字体族材质图标?,react-native,react-native-elements,react-native-vector-icons,React Native,React Native Elements,React Native Vector Icons,我是React Native的新手,我已经将React Native矢量图标库手动添加到Xcode和Android studio中。如果使用Xcode运行代码,它将成功执行,不会出现任何问题。但如果我试图从终端运行代码(react native run ios),它会在模拟器中显示“无法识别的字体系列材料”。但是,如果我运行命令(react native run android),这同样有效 请帮帮我。 这是终端中显示的错误 我不确定您的配置中到底缺少了什么,因此我将陈述我所认为的情况: 删除i

我是React Native的新手,我已经将React Native矢量图标库手动添加到Xcode和Android studio中。如果使用Xcode运行代码,它将成功执行,不会出现任何问题。但如果我试图从终端运行代码(react native run ios),它会在模拟器中显示“无法识别的字体系列材料”。但是,如果我运行命令(react native run android),这同样有效

请帮帮我。 这是终端中显示的错误


我不确定您的配置中到底缺少了什么,因此我将陈述我所认为的情况:

  • 删除ios/build文件夹,然后尝试自动链接:
    react native link react native vector icons

  • 确保已检查字体是否已在生成阶段的复制捆绑资源中复制。如果没有,请重新检查手动配置步骤

  • 确保关闭打包程序并重新运行以使更改生效


  • 我找到的解决方案是检查字体是否添加到Info.plist文件中的UIAppFonts数组中:

    <key>UIAppFonts</key>
    <array>
     <string>AntDesign.ttf</string>
     <string>Entypo.ttf</string>
     <string>EvilIcons.ttf</string>
     <string>Feather.ttf</string>
     <string>FontAwesome.ttf</string>
     <string>FontAwesome5_Brands.ttf</string>
     <string>FontAwesome5_Regular.ttf</string>
     <string>FontAwesome5_Solid.ttf</string>
     <string>Foundation.ttf</string>
     <string>Ionicons.ttf</string>
     <string>MaterialIcons.ttf</string>
     <string>MaterialCommunityIcons.ttf</string>
     <string>SimpleLineIcons.ttf</string>
     <string>Octicons.ttf</string>
     <string>Zocial.ttf</string>
    </array>
    
    UIAppFonts
    

    最简单的 您只需将以下内容添加到
    pod文件

    
    #正常的
    pod'RNVectorIcons',:path=>“../node_modules/react native vector icons”
    #如果您使用的是monorepo
    #pod“RNVectorIcons',:path=>“../../../../node_模块/反应本机向量图标”
    

    yarn podinstall
    

    谢谢,我已经删除了构建文件夹并重新构建它,然后它就可以工作了。对我来说不工作。此问题有新的解决方案吗?我搜索了几个小时都没有成功。这个答案可能已经过时了。。。正确的答案是(Seishin的回答)谢谢你的魅力,你救了我一天这个文件在哪里?对UIAppFonts的搜索没有找到任何结果
    yarn podinstall