Rocket.chat.reactnative: Run react-native run-android crash

Created on 29 Oct 2018  路  4Comments  路  Source: RocketChat/Rocket.Chat.ReactNative

This bug happens on Android development only

We're using native icons everywhere in the app, but this is a limitation of react-native-navigation on header buttons when running in dev mode.
Workarounds:

  • Option 1: Change all header buttons to use react-native-vector-icons
// before
icon: { uri: 'settings', scale: Dimensions.get('window').scale },
// after (remember to add `import { iconsMap } from '../../Icons';`)
icon: iconsMap.close,
  • Option 2: Run in release mode
    This can be a pain if you're developing to Android only, but it can work if you're developing features on iOS (this bug doesn't exist on iOS) and testing on Android.

  • Option 3: Open a PR fixing this at https://github.com/wix/react-native-navigation

馃悰 bug

Most helpful comment

@d-gubert We want to remove react-native-vector-icons completely in future, because native icons are a lot faster.

All 4 comments

Is there a problem in adopting option 1? Something like no matching icons, or not being able to control the icon size, maybe? If it is as straightforward as it sounds, I could do that :stuck_out_tongue:

@d-gubert We want to remove react-native-vector-icons completely in future, because native icons are a lot faster.

Nice, it's solved :D

@d-gubert It's more a workaround than a fix, but it works for now 馃槤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gitnepal picture gitnepal  路  3Comments

sadeghpro picture sadeghpro  路  5Comments

djnews24 picture djnews24  路  4Comments

diegolmello picture diegolmello  路  5Comments

Perflyst picture Perflyst  路  5Comments