Header crashes on Android.
See original GitHub issueExplain what you did Use header component. Used most basic example. Experiencing instant force close on Android, no error. Just closes. Works on ios.
Expected behaviour
That I can use the example header component.
<Header leftComponent={{ icon: 'menu', color: '#fff' }} centerComponent={{ text: 'MY TITLE', style: { color: '#fff' } }} rightComponent={{ icon: 'home', color: '#fff' }} />
Describe the bug
App crashes instantly.
I’ve also attempted to use an example I found in a previous issue from here.
<Header innerContainerStyles={{flexDirection: 'row'}} backgroundColor='#f40057' > <Avatar small rounded source={{uri: "http://www.usanetwork.com/sites/usanetwork/files/styles/629x720/public/2016/07/mrrobot_s2_cast_rami-malek2.jpg"}} onPress={() => this.goToProfileDetail()} activeOpacity={0.7} /> <View style={{alignItems: 'center'}}> <Text style={{justifyContent: 'center', color: '#fff', alignContent:'center'}}>Eliot Alderson</Text> <Text style={{justifyContent: 'center', color: '#fff'}}>eliot@food.com.br</Text> </View> <Icon name={'settings-applications'} color={'#fff'} onPress={() => this.goToProfileDetail()} /> </Header>
Results in the same crash. If I take the header component out everything runs properly. Relatively fresh project build. I have the following packages :
"react": "16.8.3", "react-native": "0.59.9", "react-native-clean-project": "^3.2.1", "react-native-elements": "^1.1.0", "react-native-firebase": "^5.5.4", "react-native-gesture-handler": "^1.3.0", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.0"
Your Environment (please complete the following information):
| software | version |
|---|---|
| react-native-elements | 1.1.0 |
| react-native | 0.59.9 |
| npm or yarn | 6.9.0 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:9

Top Related StackOverflow Question
@RobertSasak I have this in my code:
With Header component, it should be like:
in the header component add this : ViewComponent={View }