简体   繁体   English

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

[英]failed to add. react-native-vector-icons

W trying to add react-native-vector-icons into my app. W 试图将react-native-vector-icons添加到我的应用程序中。

This is what I'm doing:这就是我正在做的事情:

  1. yarn add react-native-vector-icons

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

  3. Open Xcode project and create new group inside the root called Files.打开 Xcode 项目并在名为 Files 的根目录中创建新组。

  4. Into the files folder I paste all fonts inside node_modules/react-native-vector-itens到文件夹中,我将所有 fonts 粘贴到node_modules/react-native-vector-itens

  5. And add this rows into info.plist file:并将这些行添加到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 . cd ios -> pod install

  7. yarn ios

  8. I got this exception for each added font:对于每个添加的字体,我都得到了这个例外:

     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”

Can anyone help?任何人都可以帮忙吗?

For versions < 0.60 you should put the files manually.对于 < 0.60 的版本,您应该手动放置文件。

Version > 0.60 autolinking will do the job so in your case you duplicate it so just delete the files you intrudoce and all will work as expected.版本 > 0.60 自动链接将完成这项工作,因此在您的情况下您复制它,因此只需删除您插入的文件,所有文件都会按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React-native-vector-icons ios错误 - React-native-vector-icons ios error 不从 react-native-vector-icons/FontAwesome 加载图标 - Not loading Icons from react-native-vector-icons/FontAwesome 如何将react-native-vector-icons链接到项目 - How to link react-native-vector-icons to project 无法解析模块“react-native-vector-icons/AntDesign” - Unable to resolve module 'react-native-vector-icons/AntDesign'' 来自 react-native-vector-icons onpress 的图标需要单击两次才能工作 - Icons from react-native-vector-icons onpress needs to click twice to work 安装 react-native-vector-icons 时 React Native iOS 构建问题 - React Native iOS build issues while installing react-native-vector-icons 未找到反应原生矢量图标的RCTfont + FA5.h文件 - RCTfont+FA5.h file not found for react-native-vector-icons 安装 react-native-vector-icons 并在 ios 上运行 pod update 后出现无效的 UIAccessibilitys &#39;tablist&#39; 错误 - Invalid UIAccessibilitys 'tablist' error after installing react-native-vector-icons and running pod update on ios node_modules/react-native-vector-icons/lib/create-icon-set.js: #<weakset> 无法克隆</weakset> - node_modules/react-native-vector-icons/lib/create-icon-set.js: #<WeakSet> could not be cloned 如何在 React Native 步进器中添加自定义图标 - How to add custom icons in React Native stepper
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM