React Native Vector图标不适用于当前版本0.60

Rah*_*hra 12 reactjs react-native react-native-ios react-native-vector-icons

反应本机自动链接不适用于反应本机矢量图标。我使用此https://github.com/oblador/react-native-vector-icons/issues/1035将其修复为android

但是在IOS上,我仍然面临问题。请让我知道是否有人解决了此问题...谢谢!

这是我面临的问题的屏幕截图。

在此处输入图片说明

Rah*_*hra 19

这对我来说适用于升级项目和全新的RN 0.60.0

对于IOS,将此添加到ios / projectname / 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>MaterialCommunityIcons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>Octicons.ttf</string>
        <string>SimpleLineIcons.ttf</string>
        <string>Zocial.ttf</string>
    </array>
Run Code Online (Sandbox Code Playgroud)

对于Android,将此行添加到android / app / build.gradle

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Run Code Online (Sandbox Code Playgroud)

这已解决了我的问题,并对在两个平台上均起作用的本机矢量图标做出了反应。