eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
217 stars 188 forks source link

Unhandled Exception: PlatformException(error, null cannot be cast to non-null type kotlin.Boolean, null, java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean #285

Closed AlanGood113 closed 1 year ago

AlanGood113 commented 1 year ago

This error comes up when starting navigation on android. The ios works fine.

E/flutter ( 3090): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, null cannot be cast to non-null type kotlin.Boolean, null, java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean E/flutter ( 3090): at com.eopeter.fluttermapboxnavigation.FlutterMapboxNavigationPlugin.checkPermissionAndBeginNavigation(FlutterMapboxNavigationPlugin.kt:177) E/flutter ( 3090): at com.eopeter.fluttermapboxnavigation.FlutterMapboxNavigationPlugin.onMethodCall(FlutterMapboxNavigationPlugin.kt:95) E/flutter ( 3090): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258) E/flutter ( 3090): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/flutter ( 3090): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) E/flutter ( 3090): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter ( 3090): at android.os.Handler.handleCallback(Handler.java:938) E/flutter ( 3090): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter ( 3090): at android.os.Looper.loopOnce(Looper.java:226) E/flutter ( 3090): at android.os.Looper.loop(Looper.java:313) E/flutter ( 3090): at android.app.ActivityThread.main(ActivityThread.java:8663) E/flutter ( 3090): at java.lang.reflect.Method.invoke(Native Method) E/flutter ( 3090): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) E/flutter ( 3090): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) E/flutter ( 3090): )

eopeter commented 1 year ago

This is fixed in v0.1.9

neetable-madhura commented 1 year ago

@AlanGood113 set longPressDestinationEnabled property in your map option