Crash MapView#onStop() was not called.
Hello, I'm using a MapView in an activity and I've implemented all of the Mapview lifecycle methods in the activity, but I still get this error:
Fatal Exception: java.lang.RuntimeException: Unable to destroy activity {com.app / com.MainActivity}: java.lang.IllegalStateException: MapView # onStop () was not called. You must call this method from the parent's {@link Activity # onStop ()} or {@link Fragment # onStop ()}.
The strange thing is that I am not using a fragment, but an activity.
Android API Version: 24 Mapbox Version: 5.0.2 Version of MapboxServices: 2.0.1
I had this same exception thrown at me as recent as v5.1.0-beta.3.
I'm not able to reproduce it every time, but I noticed it happened when I pushed activity containing map to background, then resumed it and tried to back up and kill it, then it crashed.
The strange thing is that I am not using a fragment, but an activity.
Exception message is only a tip that you should call MapView # onStop () in the right lifecycle block, either Activity's or Fragment's, depending on your use.