React Nativeで"React-Native-vector-icons"を実装したかったのですが、以下のエラーが表示されググっても解決できず困っています。
このエラーは、どのように対処すれば良いでしょうか?
ご教授願い致します。
エラー内容
ld: library not found for -lRNVectorIcons-tvOS clang: error: linker command failed with exit code 1 (use -v to see invocation)
準備
terminal
1npm install -save react-native-vector-icons
terminal
1rnpm link react-native-vector-icons
- info.plist > Fonts provided by application でFontAwesome.ttfを指定
ソース
Appjs
1import React, {Component} from 'react'; 2import {Platform, StyleSheet, Text, View} from 'react-native'; 3 import Icon from 'react-native-vector-icons/FontAwesome'; 4 5type Props = {}; 6export default class App extends Component<Props> { 7 render() { 8 return ( 9 <View style={styles.container}> 10 <Icon name="home" size={50}/> 11 </View> 12 ); 13 } 14} 15 16const styles = StyleSheet.create({ 17 container: { 18 flex: 1, 19 justifyContent: 'center', 20 alignItems: 'center', 21 backgroundColor: '#F5FCFF', 22 }, 23});
環境
Xcode
Version 10.1 (10B61)
react-native
react-native-cli: 2.0.1
react-native: 0.58.3
npm
6.7.0
参考文献
ReactNativeでFontAwesomeを使う
react-native-vector-iconsを導入して画面表示してみる
react-native-vector-iconsを使おうとして赤い画面に泣かされた時に見る覚書
React Native Iconとrnpm
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。