相关疑难解决方法(0)

无法识别的字体系列 Material Icons?

我是 React-Native 的新手,我已将 react-native-vector-icons 库手动添加到 Xcode 和 Android Studio。如果使用 Xcode 运行代码,它会成功执行而没有任何问题。但是如果我尝试从终端(react-native run-ios)运行代码,它会在模拟器中显示“无法识别的字体系列材料”。但是如果我运行命令(react-native run-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)
Run Code Online (Sandbox Code Playgroud)

react-native react-native-vector-icons react-native-elements

10
推荐指数
2
解决办法
7447
查看次数

ios 上无法识别的字体系列react-native > 0.60

我使用react-native 0.61.3-0.61.5遇到了这个错误,也许旧版本或新版本没有这个错误。

这是推荐的方法,但对我来说不起作用。

1)我已将字体放在 src/assets/fonts 文件夹中

2)在react-native.config.js中指定字体文件夹的路径 - >资产:[“./src/assets/fonts/”]

3)尝试同时运行react-native linknpx react-native link

reactjs react-native

2
推荐指数
1
解决办法
1万
查看次数