0
votes

I am following this tutorial: https://docs.mapbox.com/help/tutorials/android-navigation-sdk/

No matter what I do these packages cannot be imported.

import com.mapbox.services.android.navigation.ui.v5.NavigationLauncherOptions;
import com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute;
import com.mapbox.services.android.navigation.ui.v5.NavigationLauncher;

This is the error I get: package com.mapbox.services.android.navigation.ui.v5 does not exist

Any help will be highly appreciated.

1
And yes these packages actually do exist when you google them. I have no idea why this is happening. - Jon Snow

1 Answers

0
votes

Apparently, the tutorial is missing about one attribute that has to be imported in the gradle. So,

Aside from adding:

implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6'

You must add this too:

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