首页 / 浏览问题 / 移动GIS / 问题详情
android程序网络问题
9EXP 2022年03月18日
在程序中离线加载地图,不需要网络,但是始终报错E/LogInfoService: Get VideoList Request Failed....,

W/System.err: java.net.UnknownHostException: Unable to resolve host "log.supermap.com": No address associated with hostname
        at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:95)
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
        at java.net.InetAddress.getAllByName(InetAddress.java:752)
        at com.android.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
        at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:187)
        at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:156)
        at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:98)
        at com.android.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:345)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
W/System.err:     at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:126)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:257)
        at com.supermap.data.LogInfoService$1.run(LogInfoService.java:52)
        at java.lang.Thread.run(Thread.java:761)

但是我的程序是不需要网络的,这个怎么屏蔽掉

1个回答

你好,可以在你的  AndroidManifest.xml里面的application加上
<uses-library android:name="org.apache.http.legacy" android:required="false" />
2,842EXP 2022年03月18日
...