首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法识别的字体族材料图标?

无法识别的字体族材料图标?
EN

Stack Overflow用户
提问于 2019-03-14 09:21:23
回答 3查看 10.5K关注 0票数 11

Iam新的反应-本机,我增加了反应-本机-矢量图标库手动到Xcode和Android工作室。如果使用Xcode运行代码,它将成功执行,不会出现任何问题。但是,如果我试图从终端运行代码(反作用-本机运行-ios),它会在模拟器中显示“无法识别的字体系列材料”。但是,如果我运行命令(react本机运行-android),这也同样有效。

请帮帮我。这是终端错误屏幕截图中显示的错误。

代码语言:javascript
复制
** 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)
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2019-03-14 10:21:05

我不知道你在你的配置中到底遗漏了什么,所以我要说明我所相信的情况:

  1. 删除ios/build文件夹,然后尝试自动链接:react-native link react-native-vector-icons
  2. 确保您已经在构建阶段检查了复制包资源中的字体。如果没有,请重新检查手动配置步骤。
  3. 确保您杀死包器并重新运行以使更改生效。
票数 5
EN

Stack Overflow用户

发布于 2019-10-31 09:47:15

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

代码语言:javascript
复制
<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>

有关更多信息,这里

票数 29
EN

Stack Overflow用户

发布于 2021-06-08 02:52:35

最简单的

您只需将以下内容添加到您的Podfile

代码语言:javascript
复制
# Normal
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'


# If you are using monorepo
# pod 'RNVectorIcons', :path => '../../../node_modules/react-native-vector-icons'

然后跑

代码语言:javascript
复制
yarn podinstall
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55158847

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档