添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I am trying to fetch address using Geocode Suggestion API and Geocode result API .
When I normally load results from

locatorTask.geocode(query, geocodeParams)

then it returns the results but when I try

locatorTask.suggest(query)

and after click on one of the suggestion result

locatorTask.geocode(suggestion, geocodeParams)

then app get crashed every time with crash


FATAL EXCEPTION: OkHttp Dispatcher
java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Util;
at okhttp3.JavaNetCookieJar.decodeHeaderAsJavaNetCookies(JavaNetCookieJar.kt:81)
at okhttp3.JavaNetCookieJar.loadForRequest(JavaNetCookieJar.kt:59)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:74)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:64)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.arcgismaps.http.internal.ntlm.NtlmInterceptor.intercept(NtlmInterceptor.kt:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:205)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:533)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.Util" on path: DexPathList
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at okhttp3.JavaNetCookieJar.decodeHeaderAsJavaNetCookies(JavaNetCookieJar.kt:81)
at okhttp3.JavaNetCookieJar.loadForRequest(JavaNetCookieJar.kt:59)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:74)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:64)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.arcgismaps.http.internal.ntlm.NtlmInterceptor.intercept(NtlmInterceptor.kt:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:205)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:533)


@Erick_1 we cant share the exact code in which we are facing this, but I assure that I used the same code which is provided in the sample github repositories for map implementation.

I created some samples , all sample are working fine if implemented alone, but when we implemented in our live code then its crashing. Always shows the above error when we first search for suggestions first and then search for location using that suggestion.

Alone search for location with dummy location address is working fine but if we serch for suggestion first then its crashing on geocode API.

Also we used the 100.1 versoion of map version, then its working fine. It only occurs when we change the version to 200.1.