Skip to content
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

FATAL EXCEPTION: Failed resolution of: Lcom/mapbox/android/telemetry/NavigationMetadata; #1987

Closed
sjd753 opened this issue Jul 3, 2019 · 2 comments

Comments

@sjd753
Copy link

sjd753 commented Jul 3, 2019

Android API:

minSdkVersion 17
compileSdkVersion 28
targetSdkVersion 28

Mapbox Navigation SDK version:

implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.1.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.40.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.40.0'

Steps to trigger behavior

  1. Run the mapbox navigation ui in android 28 or above
  2. Play with the ui for a little bit
  3. App crashes with the below logs

image

Expected behavior

App / Mapbox navigation runs smoothly

Actual behavior

App crashes all of a sudden while in navigation mode

@codewithlester
Copy link

@sjd753 If you are using

implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.40.0'

you should remove the

implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.1.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.40.0'

Because NavigationUI sdk implemented already the mapbox-android-sdk & mapbox-android-navigation

Try to remove the two sdk then try to run again.

Hope this help you.

@Guardiola31337
Copy link
Contributor

Hey @sjd753 👋 thanks for reaching out and report your issue.

@iamdeveloper-lopez is totally right.

If you're using the Navigation UI SDK, you don't have to declare the Mapbox Maps SDK, it's included implicitly 👀

implementation dependenciesList.mapboxMapSdk
This is on purpose to avoid these kind of dependencies conflicts.

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 v4.5.0 and Events v4.5.1 landed in Maps v8.1.0 mapbox/mapbox-gl-native#14874 (any previous versions work 👌). We're tracking the work needed in the Navigation SDK side in #1890

There's another workaround that could be made in the meantime which is excluding the Events dependency from Maps SDK so that Events v4.4.1 from the Navigation SDK is used 👀

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants