-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoClassDefFoundError: com.mapbox.android.telemetry.NavigationMetadata #1984
Comments
Hey @saddahussain 👋 thanks for reaching out and report your issue. Are you including the Mapbox Maps SDK by any chance explicitly? If so, which version? Noting that if you're using the Navigation UI SDK, you don't have to declare the Mapbox Maps SDK, it's included implicitly 👀
That being said, we’re always striving to upgrade to the latest versions of the different dependencies included in the SDK. This issue specifically is caused because the Events version included in Mapbox Maps SDK doesn't include the Navigation events 👀 mapbox/mapbox-events-android#383 - this was included in Events There's a workaround that could be made in the meantime which is excluding the Events dependency from Maps SDK so that Events implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:8.1.0') {
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-telemetry'
} Closing as answered. Please feel free to cut a new ticket if you run into any other issues. Thanks again! |
Thanks a lot. It solved the problem. |
@saddahussain glad to hear 🎉 Thanks for the update! |
the same crash. exclude doesn't help to me. |
**Android API:19
**Mapbox Navigation SDK version:0.40.0
Steps to trigger behavior
getRoute by using NavigationRoute
Then pass currentRoute and start navigation
val options = NavigationLauncherOptions.builder() .directionsRoute(currentRoute) .shouldSimulateRoute(true) .build() NavigationLauncher.startNavigation(activity, options)
Turn by turn navigation will open and then app will crash.
Stacktrace
java.lang.NoClassDefFoundError: com.mapbox.android.telemetry.NavigationMetadata at com.mapbox.services.android.navigation.v5.navigation.NavigationMetricsWrapper.departEvent(NavigationMetricsWrapper.java:173) at com.mapbox.services.android.navigation.v5.navigation.DepartEventHandler.send(DepartEventHandler.java:18) at com.mapbox.services.android.navigation.v5.navigation.DepartEventFactory.sendToHandler(DepartEventFactory.java:52) at com.mapbox.services.android.navigation.v5.navigation.DepartEventFactory.send(DepartEventFactory.java:23) at com.mapbox.services.android.navigation.v5.navigation.NavigationTelemetry.onRouteProgressUpdate(NavigationTelemetry.java:94) at com.mapbox.services.android.navigation.v5.navigation.NavigationEventDispatcher.sendMetricProgressUpdate(NavigationEventDispatcher.java:213) at com.mapbox.services.android.navigation.v5.navigation.NavigationEventDispatcher.onProgressChange(NavigationEventDispatcher.java:163) at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorThreadListener.onNewRouteProgress(RouteProcessorThreadListener.java:34) at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorRunnable$1.run(RouteProcessorRunnable.java:147) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5641) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104) at dalvik.system.NativeStart.main(Native Method)
Expected behavior
Turn by turn navigation should start.
Actual behavior
App crashes as soon as turn by turn navigation opens.
The text was updated successfully, but these errors were encountered: