[V2] TopBar image only works in Android development mode
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
- Create new react native app
- yarn add react-native-navigation@^2.0.2461
- 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
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.