eopeter / flutter_mapbox_navigation

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

Mapbox navigation problem in flutter #196

Closed OsamaQureshi796 closed 1 year ago

OsamaQureshi796 commented 2 years ago

W/CrashReporter( 554): Root directory doesn't exist W/.baderek.drive( 554): Accessing hidden field Landroid/graphics/Typeface;->sSystemFontMap:Ljava/util/Map; (unsupported, reflection, allowed) I/Mbgl ( 554): {.baderek.driver}[General]: Loaded Mapbox Common 9.1.0, built using 9.0.2. I/OnboardRouterFiles( 554): Initial size is 3488 bytes I/.baderek.drive( 554): Thread[1,tid=554,Native,Thread*=0xb400007321812400,peer=0x7425d5c8,"main"] recursive attempt to load library "/data/app/~~_F-pd6ljFUoQhOY9MGE1jg==/com.baderek.driver-7BDT0NJcl1siTF3HYAnEzQ==/lib/arm64/libmapbox-common.so" E/MapboxNavNative( 554): User defined HTTP service instance not provided from the module implementation. E/MapboxNavNative( 554): Module: com.mapbox.common.module.okhttp.MapboxOkHttpService@156a585 E/MapboxNavNative( 554): but present is: com.mapbox.common.module.okhttp.MapboxOkHttpService@156a585 E/MapboxNavNative( 554): Are you calling HttpServiceFactory.setUserDefined() correctly? E/MapboxModuleProvider( 554): Module loading failed E/MapboxModuleProvider( 554): java.lang.NoSuchMethodException: com.mapbox.navigation.trip.notification.internal.MapboxTripNotification. [] E/MapboxModuleProvider( 554): at java.lang.Class.getConstructor0(Class.java:2363) E/MapboxModuleProvider( 554): at java.lang.Class.getConstructor(Class.java:1759) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider$noArgConstructorCreator$1.getInstance(MapboxModuleProvider.kt:107) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigation.(MapboxNavigation.kt:179) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.FlutterMapViewFactory.(FlutterMapViewFactory.kt:174) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.MapViewFactory.create(MapViewFactory.kt:17) E/MapboxModuleProvider( 554): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:230) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/MapboxModuleProvider( 554): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MapboxModuleProvider( 554): at android.os.Handler.handleCallback(Handler.java:938) E/MapboxModuleProvider( 554): at android.os.Handler.dispatchMessage(Handler.java:99) E/MapboxModuleProvider( 554): at android.os.Looper.loopOnce(Looper.java:233) E/MapboxModuleProvider( 554): at android.os.Looper.loop(Looper.java:344) E/MapboxModuleProvider( 554): at android.app.ActivityThread.main(ActivityThread.java:8248) E/MapboxModuleProvider( 554): at java.lang.reflect.Method.invoke(Native Method) E/MapboxModuleProvider( 554): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/MapboxModuleProvider( 554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) E/MapboxModuleProvider( 554): Module loading failed E/MapboxModuleProvider( 554): java.lang.NoSuchFieldException: INSTANCE E/MapboxModuleProvider( 554): at java.lang.Class.getField(Class.java:1635) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider$kotlinObjectReferenceProvider$1.getInstance(MapboxModuleProvider.kt:117) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigation.(MapboxNavigation.kt:179) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.FlutterMapViewFactory.(FlutterMapViewFactory.kt:174) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.MapViewFactory.create(MapViewFactory.kt:17) E/MapboxModuleProvider( 554): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:230) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/MapboxModuleProvider( 554): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MapboxModuleProvider( 554): at android.os.Handler.handleCallback(Handler.java:938) E/MapboxModuleProvider( 554): at android.os.Handler.dispatchMessage(Handler.java:99) E/MapboxModuleProvider( 554): at android.os.Looper.loopOnce(Looper.java:233) E/MapboxModuleProvider( 554): at android.os.Looper.loop(Looper.java:344) E/MapboxModuleProvider( 554): at android.app.ActivityThread.main(ActivityThread.java:8248) E/MapboxModuleProvider( 554): at java.lang.reflect.Method.invoke(Native Method) E/MapboxModuleProvider( 554): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/MapboxModuleProvider( 554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) E/MapboxModuleProvider( 554): Module loading failed E/MapboxModuleProvider( 554): java.lang.NoSuchMethodException: com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.getInstance [] E/MapboxModuleProvider( 554): at java.lang.Class.getMethod(Class.java:2103) E/MapboxModuleProvider( 554): at java.lang.Class.getMethod(Class.java:1724) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider$singletonReferenceProvider$1.getInstance(MapboxModuleProvider.kt:126) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigation.(MapboxNavigation.kt:179) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.FlutterMapViewFactory.(FlutterMapViewFactory.kt:174) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.MapViewFactory.create(MapViewFactory.kt:17) E/MapboxModuleProvider( 554): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:230) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/MapboxModuleProvider( 554): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MapboxModuleProvider( 554): at android.os.Handler.handleCallback(Handler.java:938) E/MapboxModuleProvider( 554): at android.os.Handler.dispatchMessage(Handler.java:99) E/MapboxModuleProvider( 554): at android.os.Looper.loopOnce(Looper.java:233) E/MapboxModuleProvider( 554): at android.os.Looper.loop(Looper.java:344) E/MapboxModuleProvider( 554): at android.app.ActivityThread.main(ActivityThread.java:8248) E/MapboxModuleProvider( 554): at java.lang.reflect.Method.invoke(Native Method) E/MapboxModuleProvider( 554): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/MapboxModuleProvider( 554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) E/MapboxModuleProvider( 554): Module loading failed E/MapboxModuleProvider( 554): java.lang.reflect.InvocationTargetException E/MapboxModuleProvider( 554): at java.lang.reflect.Constructor.newInstance0(Native Method) E/MapboxModuleProvider( 554): at java.lang.reflect.Constructor.newInstance(Constructor.java:343) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider$defaultMapboxModuleCreator$1.getInstance(MapboxModuleProvider.kt:138) E/MapboxModuleProvider( 554): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigation.(MapboxNavigation.kt:179) E/MapboxModuleProvider( 554): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.FlutterMapViewFactory.(FlutterMapViewFactory.kt:174) E/MapboxModuleProvider( 554): at com.dormmom.flutter_mapbox_navigation.factory.MapViewFactory.create(MapViewFactory.kt:17) E/MapboxModuleProvider( 554): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:230) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/MapboxModuleProvider( 554): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MapboxModuleProvider( 554): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MapboxModuleProvider( 554): at android.os.Handler.handleCallback(Handler.java:938) E/MapboxModuleProvider( 554): at android.os.Handler.dispatchMessage(Handler.java:99) E/MapboxModuleProvider( 554): at android.os.Looper.loopOnce(Looper.java:233) E/MapboxModuleProvider( 554): at android.os.Looper.loop(Looper.java:344) E/MapboxModuleProvider( 554): at android.app.ActivityThread.main(ActivityThread.java:8248) E/MapboxModuleProvider( 554): at java.lang.reflect.Method.invoke(Native Method) E/MapboxModuleProvider( 554): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/MapboxModuleProvider( 554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) E/MapboxModuleProvider( 554): Caused by: java.lang.IllegalArgumentException: com.baderek.driver: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. E/MapboxModuleProvider( 554): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. E/MapboxModuleProvider( 554): at android.app.PendingIntent.checkFlags(PendingIntent.java:375) E/MapboxModuleProvider( 554): at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:464) E/MapboxModuleProvider( 554): at android.app.PendingIntent.getActivity(PendingIntent.java:444) E/MapboxModuleProvider( 554): at android.app.PendingIntent.getActivity(PendingIntent.java:408) E/MapboxModuleProvider( 554): at com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.createPendingOpenIntent(MapboxTripNotification.kt:275) E/MapboxModuleProvider( 554): at com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.(MapboxTripNotification.kt:112) E/MapboxModuleProvider( 554): ... 23 more E/MethodChannel#flutter/platform_views( 554): Failed to handle method call E/MethodChannel#flutter/platform_views( 554): MapboxInvalidModuleException(type=NavigationTripNotification) E/MethodChannel#flutter/platform_views( 554): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:88) E/MethodChannel#flutter/platform_views( 554): at com.mapbox.navigation.core.MapboxNavigation.(MapboxNavigation.kt:179) E/MethodChannel#flutter/platform_views( 554): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23) E/MethodChannel#flutter/platform_views( 554): at com.dormmom.flutter_mapbox_navigation.factory.FlutterMapViewFactory.(FlutterMapViewFactory.kt:174) E/MethodChannel#flutter/platform_views( 554): at com.dormmom.flutter_mapbox_navigation.factory.MapViewFactory.create(MapViewFactory.kt:17) E/MethodChannel#flutter/platform_views( 554): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:230) E/MethodChannel#flutter/platform_views( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/MethodChannel#flutter/platform_views( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/MethodChannel#flutter/platform_views( 554): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/MethodChannel#flutter/platform_views( 554): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MethodChannel#flutter/platform_views( 554): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MethodChannel#flutter/platform_views( 554): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MethodChannel#flutter/platform_views( 554): at android.os.Handler.handleCallback(Handler.java:938) E/MethodChannel#flutter/platform_views( 554): at android.os.Handler.dispatchMessage(Handler.java:99) E/MethodChannel#flutter/platform_views( 554): at android.os.Looper.loopOnce(Looper.java:233) E/MethodChannel#flutter/platform_views( 554): at android.os.Looper.loop(Looper.java:344) E/MethodChannel#flutter/platform_views( 554): at android.app.ActivityThread.main(ActivityThread.java:8248) E/MethodChannel#flutter/platform_views( 554): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#flutter/platform_views( 554): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/MethodChannel#flutter/platform_views( 554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) D/SystemVibratorExtImpl( 554): is not PrebakedSegment I/SystemVibratorExtImpl( 554): SystemVibrator vibrate is uid= 10526,opPkg =com.baderek.driver,duration=200,effect=Composed{segments=[Step{amplitude=-1.0, frequency=0.0, duration=200}], repeat=-1},Binder.getCallingPid()=554 D/SystemVibratorExtImpl( 554): convertToLinearVibration uid = 10526, opPkg = com.baderek.driver, effect = Composed{segments=[Step{amplitude=-1.0, frequency=0.0, duration=200}], repeat=-1}, attributes = VibrationAttributes: Usage=ALARM Audio Usage= USAGE_ALARM Flags=0 D/SystemVibratorExtImpl( 554): no vibrator_lmvibrator or CTS vibration, do not convert E/flutter ( 554): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, NavigationTripNotification has been excluded from build but a correct alternative was not provided. E/flutter ( 554): Make sure that: E/flutter ( 554): - Your custom module implements com.mapbox.navigation.base.trip.notification.TripNotification. E/flutter ( 554): - Your custom module class is annotated with @MapboxModule(MapboxModuleType.NavigationTripNotification). E/flutter ( 554): - You've provided a ModuleProvider instance to Mapbox_TripNotificationModuleConfiguration#setModuleProvider before initializing the library, E/flutter ( 554): unless enableConfiguration flag is set to false and your implementation has a public, non-arg constructor or is a Kotlin object., null, MapboxInvalidModuleException(type=NavigationTripNotification) E/flutter ( 554): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:88) E/flutter ( 554): at com.mapbox.navigation.core.MapboxNavigation.(MapboxNavigation.kt:179) E/flutter ( 554): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23) E/flutter ( 554): at com.dormmom.flutter_mapbox_navigation.factory.FlutterMapViewFactory.(FlutterMapViewFactory.kt:174) E/flutter ( 554): at com.dormmom.flutter_mapbox_navigation.factory.MapViewFactory.create(MapViewFactory.kt:17) E/flutter ( 554): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:230) E/flutter ( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/flutter ( 554): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/flutter ( 554): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/flutter ( 554): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/flutter ( 554): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter ( 554): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter ( 554): at android.os.Handler.handleCallback(Handler.java:938) E/flutter ( 554): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter ( 554): at android.os.Looper.loopOnce(Looper.java:233) E/flutter ( 554): at android.os.Looper.loop(Looper.java:344) E/flutter ( 554): at android.app.ActivityThread.main(ActivityThread.java:8248) E/flutter ( 554): at java.lang.reflect.Method.invoke(Native Method) E/flutter ( 554): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/flutter ( 554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) E/flutter ( 554): ) E/flutter ( 554): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) E/flutter ( 554): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:296:18) E/flutter ( 554): E/flutter ( 554): #2 TextureAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1146:18) E/flutter ( 554): E/flutter ( 554): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:792:5) E/flutter ( 554): E/flutter ( 554): #4 AndroidViewController.setSize (package:flutter/src/services/platform_views.dart:819:7) E/flutter ( 554): E/flutter ( 554): #5 RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:182:29) E/flutter ( 554): E/flutter ( 554): V/MapboxHttpCallback( 554): [HTTP] Request was successful (code = 200).

eopeter commented 1 year ago

This issue is resolved