React Native Paper - 无法识别的字体系列“材料图标”

Moh*_*tha 3 react-native react-native-paper

我正在创建一个新的 React Native 应用程序并使用 react-native-paper。这不是一个 Expo 应用程序,而是一个 vanilla react 原生应用程序。

react native 版本 > 0.6.0,我已经按照 react-native-paper 安装https://callstack.github.io/react-native-paper/getting-started.html 中描述的步骤操作

react-native-paper 组件的使用方式如下

<Avatar.Icon size={24} icon="folder" />
Run Code Online (Sandbox Code Playgroud)

但是,当我使用命令运行应用程序时,react-native run-ios编译成功并且应用程序打开但出现红屏如下在此处输入图片说明

Moh*_*tha 8

找到了解决办法。

我不得不将以下内容添加到 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>
Run Code Online (Sandbox Code Playgroud)