Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3
While using your latest build implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.20.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.20.0'
gives compilation Error :
Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3
As noted in v0.20.0 release notes
Important Note: With this release, you must include the following snippet in your project’s
build.gradle:repositories { maven { url 'https://mapbox.bintray.com/mapbox' } }This will ensure the
mapboxdependency is properly downloaded. We will be adding a snippet regarding this in the repoREADMEas well.
Thanks for checking out the SDK @shrutiWV
Closing as answered.
tried but still getting below error
Process: com.makani, PID: 10474
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.makani/com.mapbox.services.android.navigation.ui.v5.MapboxNavigationActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class com.mapbox.services.android.navigation.ui.v5.NavigationView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2702)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.mapbox.services.android.navigation.ui.v5.NavigationView
at android.view.LayoutInflater.createView(LayoutInflater.java:640)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.mapbox.services.android.navigation.ui.v5.MapboxNavigationActivity.onCreate(MapboxNavigationActivity.java:31)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:614)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.mapbox.services.android.navigation.ui.v5.MapboxNavigationActivity.onCreate(MapboxNavigationActivity.java:31)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class com.mapbox.services.android.navigation.ui.v5.RecenterButton
at android.view.LayoutInflater.createView(LayoutInflater.java:640)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at android.view.View.inflate(View.java:19574)
at com.mapbox.services.android.navigation.ui.v5.NavigationView.initializeView(NavigationView.java:446)
at com.mapbox.services.android.navigation.ui.v5.NavigationView.
Hey @shrutiWV that's a different issue. Have you set up the Mapbox access token? 👀 https://www.mapbox.com/android-docs/navigation/overview/#2-get-an-access-token for further information. Hope this helps a bit! Thanks again 🙏
yes i have set the MapBox access token but not working
I've tested running the NavigationLauncherActivity from the test app which uses the NavigationLauncher (based on the log traces it seems you're using it too) and it worked 👌
Could you add some more information for reproducing the crash (minimal example) or any other specifics around your test setup? If there is any sample or pseudo code you can provide, that would be really helpful because without having additional information, I'm unable to reproduce.
This line of code produce error
NavigationLauncherOptions.Builder optionsBuilder = NavigationLauncherOptions.builder() .shouldSimulateRoute(false) .directionsProfile("driving-traffic"); optionsBuilder.directionsRoute(route); NavigationLauncher.startNavigation(this, optionsBuilder.build());
but i resolve it by using below code inspite of above
navigation.startNavigation(route);
Hey @shrutiWV, navigation.startNavigation(route); What is this navigation object ? can you please share your entire code ? I'm facing the same error you faced so may be your solution can be helpful for me. Thanks