ReactNative Android App上未加载图标

时间:2016-06-12 08:10:48

标签: android react-native

当我尝试渲染Android应用程序代码时,一切正常但图标未加载并且在图标交叉标志显示的位置 ``` 从'react-native-material-design'导入工具栏;

<Toolbar
    title={navigator && navigator.currentRoute ? navigator.currentRoute.title : 'RunSpace'}
    icon={navigator && navigator.isChild ? 'keyboard-backspace' : 'menu'}
    onIconPress={() => navigator && navigator.isChild ? navigator.back() : onIconPress()}
    actions={[{
        icon: 'warning',
        badge: { value: counter, animate: true },
        onPress: this.increment
    }]}
    style={{backgroundColor:"#944dff"}}
    rightIconStyle={{
        margin: 10
    }}
/>

依赖文件就像这样

"dependencies": {
    "@remobile/react-native-splashscreen": "^1.0.3",
    "alt": "^0.18.4",
    "native-base": "^0.3.1",
    "react": "^0.14.8",
    "react-native": "^0.25.1",
    "react-native-action-button": "^1.1.5",
    "react-native-android-statusbar": "^0.1.2",
    "react-native-icons": "^0.7.1",
    "react-native-material-design": "https://github.com/react-native-material-design/react-native-material-design-styles.git",
    "react-native-material-design-styles": "^0.2.6",
    "react-native-navigation-bar": "^0.1.10",
    "react-native-scrollable-tab-view": "^0.4.3",
    "react-native-vector-icons": "^2.0.3"
  },

1 个答案:

答案 0 :(得分:0)

您尚未在项目中包含本机模块。为此,请参阅github

上的react-native-vector-icons的自述文件

您必须将该模块添加到MainActivity.java文件