react-native-maps: Crashes when clicking back button to exit on Android
Hi, I use MapView as the main screen of the app and when I try exiting using the back button it crashes with the following error
java.lang.NullPointerException: Attempt to invoke interface method 'void maps.af.y.q()' on a null object reference at maps.af.Q.d(Unknown Source)
Anyone know how I can fix it?
Thanks
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 6
- Comments: 15 (2 by maintainers)
Commits related to this issue
- Suppress crash when onDestroy is invoked See https://github.com/lelandrichardson/react-native-maps/issues/414 — committed to alvinthen/react-native-maps by alvinthen 8 years ago
- Suppress crash when onDestroy is invoked See https://github.com/lelandrichardson/react-native-maps/issues/414 — committed to alvinthen/react-native-maps by alvinthen 8 years ago
- Attempt to fix occasional crashes on android https://github.com/airbnb/react-native-maps/issues/414 — committed to IjzerenHein/react-native-maps by IjzerenHein 8 years ago
- Wrap and protect onDestroy, since it can sometimes crash when hitting the back-button to exit out of a RN app: https://github.com/airbnb/react-native-maps/issues/414 — committed to mikelambert/react-native-maps by mikelambert 8 years ago
I can’t believe the issue is from Jul and still no progress made. I end up exiting the app from another view:
Hi, This patch of
AirMapView.java0.8.2 works for me: