You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the android-auto example from this repo as a basis.
Load a map style from a local JSON file in android-auto-app/src/main/java/com/mapbox/navigation/examples/androidauto/car/MainCarSession.kt
Search a route to a destination and start a trip.
Expected behavior
Navigation SDK for Android Auto should handle both cloud-based as well as local JSON styles.
Actual behavior
The following error is thrown:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.Collections$SingletonList.get(Collections.java:5042)
at com.mapbox.navigation.ui.androidauto.navigation.MapUserStyleObserver.updateState(MapUserStyleObserver.kt:29)
at com.mapbox.navigation.ui.androidauto.navigation.MapUserStyleObserver.onAttached(MapUserStyleObserver.kt:19)
at com.mapbox.navigation.ui.androidauto.navigation.roadlabel.CarRoadLabelRenderer.onAttached(CarRoadLabelRenderer.kt:77)
at com.mapbox.maps.extension.androidauto.CarMapSurfaceOwner.registerObserver$extension_androidauto_release(CarMapSurfaceOwner.kt:54)
at com.mapbox.maps.extension.androidauto.MapboxCarMap.registerObserver(MapboxCarMap.kt:149)
at com.mapbox.navigation.ui.androidauto.freedrive.FreeDriveCarScreen$1.onResume(FreeDriveCarScreen.kt:46)
at androidx.lifecycle.DefaultLifecycleObserverAdapter.onStateChanged(DefaultLifecycleObserverAdapter.kt:26)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:320)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.jvm.kt:257)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.jvm.kt:293)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.jvm.kt:142)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.jvm.kt:124)
at androidx.car.app.Screen.lambda$dispatchLifecycleEvent$1$androidx-car-app-Screen(Screen.java:340)
at androidx.car.app.Screen$$ExternalSyntheticLambda1.run(Unknown Source:4)
at androidx.car.app.utils.ThreadUtils.runOnMain(ThreadUtils.java:38)
at androidx.car.app.Screen.dispatchLifecycleEvent(Screen.java:328)
at androidx.car.app.ScreenManager.popInternal(ScreenManager.java:375)
at androidx.car.app.ScreenManager.popToRoot(ScreenManager.java:216)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager.replaceTop(MapboxScreenManager.kt:235)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager.onReplaceTop(MapboxScreenManager.kt:230)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager.onScreenEvent(MapboxScreenManager.kt:210)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager.access$onScreenEvent(MapboxScreenManager.kt:68)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager$lifecycleObserver$1$onCreate$1$1.emit(MapboxScreenManager.kt:81)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager$lifecycleObserver$1$onCreate$1$1.emit(MapboxScreenManager.kt:81)
at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382)
at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:235)
at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:191)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:163)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:474)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:508)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:497)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:368)
at kotlinx.coroutines.flow.SharedFlowImpl.tryEmit(SharedFlow.kt:399)
at com.mapbox.navigation.ui.androidauto.screenmanager.MapboxScreenManager$Companion.replaceTop(MapboxScreenManager.kt:292)
at com.mapbox.navigation.ui.androidauto.preview.CarRoutePreviewScreen.onGetTemplate$lambda$2(CarRoutePreviewScreen.kt:128)
at com.mapbox.navigation.ui.androidauto.preview.CarRoutePreviewScreen.$r8$lambda$cjvY8ej50Xno8ZQZK_I0s37EBd0(Unknown Source:0)
at com.mapbox.navigation.ui.androidauto.preview.CarRoutePreviewScreen$$ExternalSyntheticLambda1.onClick(Unknown Source:2)
at androidx.car.app.model.OnClickDelegateImpl$OnClickListenerStub.lambda$onClick$0$androidx-car-app-model-OnClickDelegateImpl$OnClickListenerStub(OnClickDelegateImpl.java:96)
at androidx.car.app.model.OnClickDelegateImpl$OnClickListenerStub$$ExternalSyntheticLambda0.dispatch(Unknown Source:2)
at androidx.car.app.utils.RemoteUtils.lambda$dispatchCallFromHost$0(RemoteUtils.java:148)
at androidx.car.app.utils.RemoteUtils$$ExternalSyntheticLambda1.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@67854e4, Dispatchers.Main.immediate]
As far as I can tell, the reason seems to be this expectation of an URL scheme.
The text was updated successfully, but these errors were encountered:
Android API: 33
Mapbox Navigation SDK version: 3.0.4
Steps to trigger behavior
android-auto
example from this repo as a basis.android-auto-app/src/main/java/com/mapbox/navigation/examples/androidauto/car/MainCarSession.kt
Expected behavior
Navigation SDK for Android Auto should handle both cloud-based as well as local JSON styles.
Actual behavior
The following error is thrown:
As far as I can tell, the reason seems to be this expectation of an URL scheme.
The text was updated successfully, but these errors were encountered: