微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

添加失败反应本机矢量图标

如何解决添加失败反应本机矢量图标

W 尝试将 react-native-vector-icons 添加到我的应用中。

这就是我正在做的:

  1. yarn add react-native-vector-icons

  2. react-native link react-native-vector-icons

  3. 打开 Xcode 项目并在名为 Files 的根目录中创建新组。

  4. 我将所有字体粘贴到文件夹中 node_modules/react-native-vector-itens

  5. 并将这些行添加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>Fontisto.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>
    
  6. cd ios -> pod install

  7. yarn ios

  8. 对于每个添加的字体,我都得到了这个例外:

    Build system information
    error: Multiple commands produce '/Users/flavio.luiz/Library/Developer/Xcode/DerivedData/Grdiariesapp-glxxnoufhzcqqqehxmwglijwtgap/Build/Products/Debug-iphonesimulator/Grdiariesapp.app/FontAwesome5_Brands.ttf':
    1) Target 'Grdiariesapp' (project 'Grdiariesapp') has copy command from '/Users/flavio.luiz/Documents/learning/Grdiariesapp/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf' to '/Users/flavio.luiz/Library/Developer/Xcode/DerivedData/Grdiariesapp-glxxnoufhzcqqqehxmwglijwtgap/Build/Products/Debug-iphonesimulator/Grdiariesapp.app/FontAwesome5_Brands.ttf'
    2) That command depends on command in Target 'Grdiariesapp' (project 'Grdiariesapp'): script phase “[CP] copy Pods Resources”
    

有人可以帮忙吗?

解决方法

对于

版本 > 0.60 自动链接将完成这项工作,因此在您的情况下,您可以复制它,因此只需删除您侵入的文件,一切都会按预期工作。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。