react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[V2] TopBar image only works in Android development mode

Open tanysheng opened this issue 8 years ago • 1 comments

Issue Description

I have setup react-native-navigation v2 successfully, but encounter one issue. The TopBar image which is working in development mode with development server, but failed to work after i compile to apk. I suspect there is something wrong during bundle process.

This is the error NavigationIconResolver.java:36com.reactnativenavigation.viewcontrollers.button.NavigationIconResolver$1.onError

This is the script i used to bundle the app: react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug

Then i run this to generate the apk: cd ./android && ./gradlew app:assembleDebug

Steps to Reproduce / Code Snippets / Screenshots

  1. Create new react native app
  2. yarn add react-native-navigation@^2.0.2461
  3. Add image to TopBar as below: static get options() { return { topBar: { leftButtons: [ { id: 'btnDrawer', icon: require('../../images/ic_menu_white.png') } ] } }; }

Environment

  • React Native Navigation version: 2.0.2478
  • React Native version: 0.56.0
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Device - 8.1.0

tanysheng avatar Aug 26 '18 13:08 tanysheng

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

support avatar Aug 27 '18 06:08 support