添加失败。反应本机矢量图标
failed to add. react-native-vector-icons
W 试图将 react-native-vector-icons
添加到我的应用程序中。
这就是我正在做的事情:
yarn add react-native-vector-icons
react-native link react-native-vector-icons
打开 Xcode 项目并在名为 Files 的根目录中创建新组。
进入我把所有字体粘贴进去的文件夹node_modules/react-native-vector-itens
并将这些行添加到 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>
cd ios -> pod install
.
yarn ios
我为每个添加的字体都得到了这个例外:
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 的版本,您应该手动放置文件。
版本 > 0.60 自动链接将完成工作,因此在您的情况下,您复制它,因此只需删除您输入的文件,所有文件都会按预期工作。
W 试图将 react-native-vector-icons
添加到我的应用程序中。
这就是我正在做的事情:
yarn add react-native-vector-icons
react-native link react-native-vector-icons
打开 Xcode 项目并在名为 Files 的根目录中创建新组。
进入我把所有字体粘贴进去的文件夹
node_modules/react-native-vector-itens
并将这些行添加到
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>
cd ios -> pod install
.yarn ios
我为每个添加的字体都得到了这个例外:
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 的版本,您应该手动放置文件。
版本 > 0.60 自动链接将完成工作,因此在您的情况下,您复制它,因此只需删除您输入的文件,所有文件都会按预期工作。