3

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

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" />

但是,当我使用命令运行应用程序时,react-native run-ios编译成功并且应用程序打开但红屏如下所示在此处输入图像描述

4

1 回答 1

11

找到了解决方案。

我必须将以下内容添加到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>
于 2019-08-15T08:10:22.740 回答