2016-03-10 66 views
0

這裏的場景是我連接到一個wifi和我的應用程序正在計算路線。它應該仍然有效,因爲它支持離線導航。應該有一種方法來強制SDK脫機工作,即使它在線。謝謝!這裏的SDK離線導航不起作用

這是我得到的日誌。

Application started. 
03-10 10:17:43.185 32527-5764/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: NetworkSSLContextFactory created successfully 
03-10 10:17:43.185 32527-5764/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: generateSSlContext BEGIN 
03-10 10:17:43.260 32527-5764/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: The number of files 164 found in /storage/emulated/0/.here-maps/certs/ 
03-10 10:17:43.767 32527-5764/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: The number of valid certificates 164 
03-10 10:17:43.806 32527-5764/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: generateSSlContext END [email protected] 
03-10 10:17:43.809 32527-5764/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0 
03-10 10:17:43.809 32527-5764/global.Here.Map.Service.v2 D/libc: getaddrinfo called from pid =32527 
03-10 10:17:43.809 32527-5764/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0 
03-10 10:17:43.809 32527-5764/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0 
03-10 10:17:43.809 32527-5764/global.Here.Map.Service.v2 D/libc: getaddrinfo called from pid =32527 
03-10 10:17:43.809 32527-5764/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=1024; ai_family=0 
03-10 10:17:46.815 32527-5764/global.Here.Map.Service.v2 E/NetworkProtocol: NetworkProtocol::GetTask::run exception: java.net.UnknownHostException: Unable to resolve host "version.hybrid.api.here.com": Unknown error 
03-10 10:17:46.815 32527-5764/global.Here.Map.Service.v2 W/System.err: java.net.UnknownHostException: Unable to resolve host "version.hybrid.api.here.com": Unknown error 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at java.net.InetAddress.lookupHostByName(InetAddress.java:482) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at java.net.InetAddress.getAllByNameImpl(InetAddress.java:255) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at java.net.InetAddress.getAllByName(InetAddress.java:218) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:303) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:242) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:397) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:347) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:515) 
03-10 10:17:46.817 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err:  at com.here.hype.NetworkProtocol$GetTask.run(NetworkProtocol.java:221) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err:  at java.lang.Thread.run(Thread.java:818) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err: Caused by: android.system.GaiException: android_getaddrinfo failed: GAI_ error 401 (Unknown error) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err:  at libcore.io.Posix.android_getaddrinfo(Native Method) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err:  at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err:  at java.net.InetAddress.lookupHostByName(InetAddress.java:446) 
03-10 10:17:46.818 32527-5764/global.Here.Map.Service.v2 W/System.err: ... 14 more 


Calculate route executed 

03-10 10:21:06.554 32455-12106/com.maps.plot D/NetworkSSLContextFactory: NetworkSSLContextFactory created successfully 
03-10 10:21:06.554 32455-12106/com.maps.plot D/NetworkSSLContextFactory: generateSSlContext BEGIN 
03-10 10:21:06.557 32455-32455/com.maps.plot I/System.out: Route calculation progress:3% 
03-10 10:21:06.630 32455-12106/com.maps.plot D/NetworkSSLContextFactory: The number of files 164 found in /storage/emulated/0/.here-maps/certs/ 
03-10 10:21:06.638 32455-32455/com.maps.plot I/System.out: Route calculation progress:6% 
03-10 10:21:06.707 32455-32455/com.maps.plot I/System.out: Route calculation progress:9% 
03-10 10:21:06.755 32455-32455/com.maps.plot I/System.out: Route calculation progress:12% 
03-10 10:21:06.806 32455-32455/com.maps.plot I/System.out: Route calculation progress:15% 
03-10 10:21:06.881 32455-32455/com.maps.plot I/System.out: Route calculation progress:18% 
03-10 10:21:06.954 32455-32455/com.maps.plot I/System.out: Route calculation progress:21% 
03-10 10:21:06.969 32455-12106/com.maps.plot D/NetworkSSLContextFactory: The number of valid certificates 164 
03-10 10:21:07.001 32455-12106/com.maps.plot D/NetworkSSLContextFactory: generateSSlContext END [email protected] 
03-10 10:21:07.002 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0 
03-10 10:21:07.002 32455-12106/com.maps.plot D/libc: getaddrinfo called from pid =32455 
03-10 10:21:07.002 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0 
03-10 10:21:07.002 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0 
03-10 10:21:07.002 32455-12106/com.maps.plot D/libc: getaddrinfo called from pid =32455 
03-10 10:21:07.002 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=1024; ai_family=0 
03-10 10:21:07.003 32455-12106/com.maps.plot D/libc: remote DNS query failed we don't need to try local DNS query result_code =401 
03-10 10:21:07.003 32455-12106/com.maps.plot D/libc: dnsproxy getaddrinfo returns 401 
03-10 10:21:07.003 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0 
03-10 10:21:07.003 32455-12106/com.maps.plot D/libc: getaddrinfo called from pid =32455 
03-10 10:21:07.003 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0 
03-10 10:21:07.004 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0 
03-10 10:21:07.004 32455-12106/com.maps.plot D/libc: getaddrinfo called from pid =32455 
03-10 10:21:07.004 32455-12106/com.maps.plot D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=1024; ai_family=0 
03-10 10:21:07.005 32455-12106/com.maps.plot E/NetworkProtocol: NetworkProtocol::GetTask::run exception: java.net.UnknownHostException: Unable to resolve host "v107-61-30-8.route.hybrid.api.here.com": Unknown error 
03-10 10:21:07.005 32455-12106/com.maps.plot W/System.err: java.net.UnknownHostException: Unable to resolve host "v107-61-30-8.route.hybrid.api.here.com": Unknown error 
03-10 10:21:07.005 32455-12106/com.maps.plot W/System.err:  at java.net.InetAddress.lookupHostByName(InetAddress.java:482) 
03-10 10:21:07.005 32455-12106/com.maps.plot W/System.err:  at java.net.InetAddress.getAllByNameImpl(InetAddress.java:255) 
03-10 10:21:07.005 32455-12106/com.maps.plot W/System.err:  at java.net.InetAddress.getAllByName(InetAddress.java:218) 
03-10 10:21:07.005 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29) 
03-10 10:21:07.005 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:303) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:242) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:397) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:347) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:515) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at com.here.hype.NetworkProtocol$GetTask.run(NetworkProtocol.java:221) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at java.lang.Thread.run(Thread.java:818) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err: Caused by: android.system.GaiException: android_getaddrinfo failed: GAI_ error 401 (Unknown error) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at libcore.io.Posix.android_getaddrinfo(Native Method) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err:  at java.net.InetAddress.lookupHostByName(InetAddress.java:446) 
03-10 10:21:07.006 32455-12106/com.maps.plot W/System.err: ... 14 more 
03-10 10:21:07.024 32455-32455/com.maps.plot I/System.out: Route calculation progress:24% 
03-10 10:21:07.101 32455-32455/com.maps.plot I/System.out: Route calculation progress:27% 
03-10 10:21:07.104 32455-32455/com.maps.plot I/System.out: Route calculation failed: REQUEST_TIMEOUT 
03-10 10:21:50.626 32455-32455/com.maps.plot I/System.out: Location changed 42.10214493:-87.8712617 
+0

似乎您的設備無法連接到路由服務器?仔細檢查您的設備是否具有連接性?你在防火牆後面嗎?也許也是一個暫時的問題?一般來說,如果所有必要數據都可以脫機使用,那麼Mobile SDK Premium會離線執行路由計算。所以,當你在開始路由計算之前下載地圖數據(例如通過MapLoader)時,這應該起作用。如果您請求交通感知路由,當然也需要連接到交通服務器。 – Marco

+0

感謝@Marco的迴應。我已經下載了我正在工作的地區的地圖。我測試過瀏覽該地區,我可以看到地圖區域。該設備已連接到代理服務器,並且之前正在運行。如果代理不允許繼續進行請求。應該有一種方法,SDK將離線重新計算路由。 – neilQ5

回答

0

我一直在爲此工作一週,終於解決了這個問題。所以我在公司的網絡下工作,因此非常沒有生產力。

因此,我所做的是在我的WiFi設置下添加一個代理服務器,因爲所有外部網絡請求都應該通過代理,否則會出現SSL錯誤。