Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
getIconStateFromId
TitleBarLeftButtonParamsParser.java:20
parseSingleButton
TitleBarLeftButtonParamsParser.java:15
setScreenTitleBarLeftButton
NavigationReactModule.java:91
setScreenButtons
NavigationReactModule.java:76
invoke
Method.java
invoke
JavaMethodWrapper.java:363
invoke
JavaModuleWrapper.java:162
run
NativeRunnable.java
handleCallback
Handler.java:739
dispatchMessage
Handler.java:95
dispatchMessage
MessageQueueThreadHandler.java:31
loop
Looper.java:148
run
MessageQueueThreadImpl.java:194
run
Thread.java:818
We experienced the same issue, and fixed it by adding id
property to each navigator button.
@Froelund If added id
this component is not showing on android.
Experienced the same issue, on android only. When you specify your left button, you have to add the id. In my case, I had custom back button, without id specified, and had the same error as OP.
Adding id: back
helped.
Here's the line that causes that:
https://github.com/wix/react-native-navigation/blob/4648a3bdf9b70b125ada5fac3afc5ce3a45be895/android/app/src/main/java/com/reactnativenavigation/params/parsers/TitleBarLeftButtonParamsParser.java#L20
Seems component: 'example.CustomButton'
doesn't work on Android for buttons.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Most helpful comment
Experienced the same issue, on android only. When you specify your left button, you have to add the id. In my case, I had custom back button, without id specified, and had the same error as OP.
Adding
id: back
helped.Here's the line that causes that:
https://github.com/wix/react-native-navigation/blob/4648a3bdf9b70b125ada5fac3afc5ce3a45be895/android/app/src/main/java/com/reactnativenavigation/params/parsers/TitleBarLeftButtonParamsParser.java#L20