flutter_mapbox_navigation
flutter_mapbox_navigation copied to clipboard
Flutter Mapbox NullPointerException: Missing ManeuverView ID After Multiple Attempts
I’m using both the flutter_mapbox_navigation: ^0.2.2 and mapbox_maps_flutter: ^0.6.0 packages in my Flutter project, and I’m facing a strange runtime crash that occurs after first attempts to use the navigation feature. The app works perfectly the first times I try it, but on the second attempt, it crashes with the following error:
Error
E/AndroidRuntime( 6401): FATAL EXCEPTION: main
E/AndroidRuntime( 6401): Process: app.splenify.nurses, PID: 6401
E/AndroidRuntime( 6401): java.lang.NullPointerException: Missing required view with ID: app.splenify.nurses:id/maneuverView
E/AndroidRuntime( 6401): at com.mapbox.navigation.dropin.databinding.MapboxManeuverGuidanceLayoutBinding.bind(MapboxManeuverGuidanceLayoutBinding.java:60)
E/AndroidRuntime( 6401): at com.mapbox.navigation.dropin.maneuver.ManeuverViewBinder.bind(ManeuverViewBinder.kt:27)
E/AndroidRuntime( 6401): at com.mapbox.navigation.dropin.maneuver.ManeuverViewBinder.bind(ManeuverViewBinder.kt:16)
E/AndroidRuntime( 6401): at com.mapbox.navigation.ui.base.lifecycle.UICoordinator$onAttached$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:136)
E/AndroidRuntime( 6401): at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invokeSuspend(Zip.kt:262)
E/AndroidRuntime( 6401): at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invoke(Unknown Source:13)
E/AndroidRuntime( 6401): at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invoke(Unknown Source:6)
E/AndroidRuntime( 6401): at kotlinx.coroutines.flow.internal.CombineKt$combineInternal$2.invokeSuspend(Combine.kt:76)
E/AndroidRuntime( 6401): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime( 6401): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
E/AndroidRuntime( 6401): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 6401): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6401): at android.os.Looper.loop(Looper.java:263)
E/AndroidRuntime( 6401): at android.app.ActivityThread.main(ActivityThread.java:8292)
E/AndroidRuntime( 6401): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 6401): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
E/AndroidRuntime( 6401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
E/AndroidRuntime( 6401): Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@4521ef7, Dispatchers.Main]
I/Process ( 6401): Sending signal. PID: 6401 SIG: 9
Additionally, I’ve noticed the following message on mobile notification:
4 retained objects, tap to dump heap. App visible, waiting until 5 retained objects in mobile notification
Any update or any workaround on this issue?
Having the same issue