Nativebase: Icons not showing

Created on 24 Aug 2016  路  13Comments  路  Source: GeekyAnts/NativeBase

I'm getting started with NativeBase, so I copy/pasted the InputGroup example with Icon. When I run the app, I'm seeing an X where the icon is supposed to be.

screen shot 2016-08-24 at 12 46 22 pm

Is there any initial setup required for the Icons that I'm missing? Here's my code:

import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { Button, InputGroup, Input, Icon } from 'native-base';

export default class SetUsername extends Component {
  render () {
    return (
      <View>
        <Text>Choose a username</Text>
        <Icon name="ios-home" style={{color: '#384850'}} />
        <InputGroup borderType="rounded" >
          <Icon name="ios-home" style={{color: '#384850'}} />
          <Input placeholder="Username" />
        </InputGroup>
        <Button type="block">Choose</Button>
      </View>
    );
  }
}

Most helpful comment

To get around this I did:
react-native link
then:
react-native run-android and the icons showed up. :)

All 13 comments

@javorosas Which version of RN and NativeBase are you using?
Also try setting up icons for android from the docs

I had the same problem. I reinstalled the app and icons are shown.

My version:
React Native - 0.32
NativeBase - 0.5.7

Let's follow this thread for Icon related issues. #76

I had the same problem. I reinstalled the app and icons are shown.

My version:
React Native - 0.39.2
NativeBase - 0.5.18

Hi, close project and start.

To get around this I did:
react-native link
then:
react-native run-android and the icons showed up. :)

I did what @veb done and success 馃憤

Simply uninstall app and reinstall it solved.

1st run this comment
react-native link
then:
react-native run-android and the icons showed up. now

just run react-native link and then react-native run-android and it should work

i did what @veb and @kenmasters do , and succes , thank you

Thank you so much friends.I was also facing this problem.now it is work successfully.

Do not run react-native link if you already did it at the start of project. Else it will cause linking twice and you'll face this https://github.com/wix/react-native-camera-kit/issues/132

Was this page helpful?
0 / 5 - 0 ratings