React Native Paper - 无法识别的字体系列“材料图标" [英] React Native Paper - Unrecognized font family 'Material Icons'
问题描述
我正在创建一个新的 React Native 应用程序并使用 react-native-paper.这不是一个 Expo 应用程序,而是一个 vanilla react 原生应用程序.
I am creating a new react native app and using react-native-paper. This is not an Expo app but a vanilla react native app.
react native 版本 > 0.6.0,我已经按照 react-native-paper 安装中描述的步骤 https://callstack.github.io/react-native-paper/getting-started.html
The react native version is > 0.6.0 and I have followed the steps described in the react-native-paper installation https://callstack.github.io/react-native-paper/getting-started.html
react-native-paper 组件的使用方式如下
The way the react-native-paper component is used is as below
<Avatar.Icon size={24} icon="folder" />
但是,当我使用命令 react-native run-ios
运行应用程序时,编译成功并且应用程序打开,但出现如下红屏一个>
However when I run the app with the command react-native run-ios
the compilation is successful and the app opens but the red screen appears as below
推荐答案
找到解决方案.
我必须将以下内容添加到 info.plist
I had to add the following to the 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>
这篇关于React Native Paper - 无法识别的字体系列“材料图标"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!