NavigatRoute Android sample program gets java.util.concurrent.ExecutionException: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid call.: Object failed to load, unable to execute task. error trying to establish routing parameters on the following instruction at line 90:
(I am using the Kotlin sample)
<val routeParameters = routeParametersFuture.get().apply {
try {
setStops(routeStops)
isReturnDirections = true
isReturnStops = true
isReturnRoutes = true
} catch (e: Exception) {
when (e) {
is InterruptedException, is ExecutionException -> {
val error = "Error getting the default route parameters: " + e.message
Toast.makeText(this@MainActivity, error, Toast.LENGTH_LONG).show()
Log.e(TAG, error)
}
else -> throw e
}
}
}/>
The error occurs on this line: val routeParameters = routeParametersFuture.get().apply
Here is the error stack:
< Caused by: java.util.concurrent.ExecutionException: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid call.: Object failed to load, unable to execute task.
at com.esri.arcgisruntime.a.d.b.get(SourceFile:18)
at edu.nmhu.bssd5250.navigate_route.MainActivity.onCreate$lambda-4(MainActivity.kt:90)
at edu.nmhu.bssd5250.navigate_route.MainActivity.$r8$lambda$Dyc7mCCcYCSWH1wQ1yfIlA3Y5M8(MainActivity.kt)
at edu.nmhu.bssd5250.navigate_route.MainActivity$$ExternalSyntheticLambda6.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid call.: Object failed to load, unable to execute task.
at com.esri.arcgisruntime.a.d.b.get(SourceFile:10)
at edu.nmhu.bssd5250.navigate_route.MainActivity.onCreate$lambda-4(MainActivity.kt:90)
at edu.nmhu.bssd5250.navigate_route.MainActivity.$r8$lambda$Dyc7mCCcYCSWH1wQ1yfIlA3Y5M8(MainActivity.kt)
at edu.nmhu.bssd5250.navigate_route.MainActivity$$ExternalSyntheticLambda6.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) />