无法识别的字体系列 Material Icons? [英] Unrecognized font family Material Icons?

查看:72
本文介绍了无法识别的字体系列 Material Icons?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 React-Native 的新手,我已将 react-native-vector-icons 库手动添加到 Xcode 和 Android Studio.如果使用 Xcode 运行代码,它会成功执行而没有任何问题.但是如果我尝试从终端(react-native run-ios)运行代码,它会在模拟器中显示无法识别的字体系列材料".但如果我运行命令(react-native run-android),这同样有效.

Iam new to React-Native, I have added react-native-vector-icons library manually to Xcode and Android studio. if run the code with Xcode its executing successfully without any issue. but if i trying to run the code from Terminal (react-native run-ios) its showing 'Unrecognized font family Material' in simulator. but the same this working if i runs the command (react-native run-android).

请帮帮我.这是在终端 错误屏幕截图

please help me. this is the error showing in terminal Error Screen shot

** BUILD FAILED **


The following build commands failed:

    CompileC /Users/user/Documents/Test/JobsNProfiles/ios/build/Build/Intermediates.noindex/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RCTFont+FA5.o /Users/user/Documents/Test/JobsNProfiles/node_modules/react-native-vector-icons/RNVectorIconsManager/RCTFont+FA5.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

推荐答案

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

I am not sure what exactly you are missing in your configuration, so I am gonna state all what I believe is the case:

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

确保您已检查字体是否已复制到构建阶段的复制包资源中.如果没有,请重新检查手动配置步骤.

Make sure you have checked that the font is copied in the Copy Bundle Resources in Build Phases. If not, re-check the manual configuration steps.

确保终止打包程序并重新运行以使更改生效.

Make sure you kill the packager and re-run for changes to take effect.

这篇关于无法识别的字体系列 Material Icons?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆