Столкнулся с проблемой, когда мое приложение, использующее https://github.com/square/okhttp - версия okhttp - 3.12.1, не может подключиться к домену, хотя я предоставил разрешение Интернета в AndroidManifest. xml
Однако, судя по комментариям в обзорах, пользователь смог подключиться к Интернету на своем устройстве и использовать другие приложения.
На данный момент я не могу воспроизвести исключение, и, следовательно, если кто-нибудь, кто сталкивался с этой проблемой раньше, может помочь мне лучше понять.
Я не могу обновите библиотеку в данный момент, так как я не хочу вносить большие изменения.
Stacktrace
Caused by: java.net.UnknownHostException: Unable to resolve host "domain.com": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
at java.net.InetAddress.getAllByName(InetAddress.java:1152)
at okhttp3.Dns$-CC.lambda$static$0(SourceFile:39)
at okhttp3.-$$Lambda$Dns$mTkNcZf2K4euny3_jks6Cac6Az0.lookup(Unknown Source:0)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(SourceFile:185)
at okhttp3.internal.connection.RouteSelector.nextProxy(SourceFile:149)
at okhttp3.internal.connection.RouteSelector.next(SourceFile:84)
at okhttp3.internal.connection.StreamAllocation.findConnection(SourceFile:214)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(SourceFile:135)
at okhttp3.internal.connection.StreamAllocation.newStream(SourceFile:114)
at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:125)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at com.appdynamics.eumagent.runtime.a.a$a.intercept(SourceFile:108)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:264)
at okhttp3.RealCall.execute(SourceFile:93)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Linux.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:74)
at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:200)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:74)
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
... 39 more
Подробнее здесь: https://stackoverflow.com/questions/597 ... -address-a
Java.net.UnknownHostException: невозможно разрешить хост «domain.com»: с именем хоста не связан адрес ⇐ Android
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение