Iam新的反应-本机,我增加了反应-本机-矢量图标库手动到Xcode和Android工作室。如果使用Xcode运行代码,它将成功执行,不会出现任何问题。但是,如果我试图从终端运行代码(反作用-本机运行-ios),它会在模拟器中显示“无法识别的字体系列材料”。但是,如果我运行命令(react本机运行-android),这也同样有效。
请帮帮我。这是终端错误屏幕截图中显示的错误。
** 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)发布于 2019-03-14 10:21:05
我不知道你在你的配置中到底遗漏了什么,所以我要说明我所相信的情况:
react-native link react-native-vector-icons。发布于 2019-10-31 09:47:15
我找到的解决方案是检查字体是否添加到Info.plist文件中的Info.plist数组中:
<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>有关更多信息,这里
发布于 2021-06-08 02:52:35
最简单的
您只需将以下内容添加到您的Podfile中
# Normal
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
# If you are using monorepo
# pod 'RNVectorIcons', :path => '../../../node_modules/react-native-vector-icons'然后跑
yarn podinstallhttps://stackoverflow.com/questions/55158847
复制相似问题