请帮我修复断管错误


04-19 10:54:49.134: W/System.err(16287): java.net.SocketException: Connection timed out
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.platform.OSNetworkSystem.read(Native Method)
04-19 10:54:49.139: W/System.err(16287): at dalvik.system.BlockGuard$WrappedNetworkSystem.read(BlockGuard.java:273)
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:458)
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)
04-19 10:54:49.139: W/System.err(16287): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:166)
04-19 10:54:49.139: W/System.err(16287): at java.io.BufferedInputStream.read(BufferedInputStream.java:225)
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readLine(HttpURLConnectionImpl.java:660)
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readResponseHeaders(HttpURLConnectionImpl.java:690)
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1040)
04-19 10:54:49.139: W/System.err(16287): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:726)
04-19 10:54:49.139: W/System.err(16287): at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:408)
04-19 10:54:49.139: W/System.err(16287): at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:391)
04-19 10:54:49.139: W/System.err(16287): at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:157)
04-19 10:54:49.139: W/System.err(16287): at org.jsoup.helper.HttpConnection.get(HttpConnection.java:146)
04-19 10:54:49.139: W/System.err(16287): at mobile.app.deals.com.au.DealAppActivity.getCurrentCity(DealAppActivity.java:518)
04-19 10:54:49.139: W/System.err(16287): at mobile.app.deals.com.au.DealAppActivity.access$13(DealAppActivity.java:513)
04-19 10:54:49.139: W/System.err(16287): at mobile.app.deals.com.au.DealAppActivity$MyWebViewClient.onPageStarted(DealAppActivity.java:792)
04-19 10:54:49.139: W/System.err(16287): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:266)
04-19 10:54:49.139: W/System.err(16287): at android.os.Handler.dispatchMessage(Handler.java:99)
04-19 10:54:49.139: W/System.err(16287): at android.os.Looper.loop(Looper.java:123)
04-19 10:54:49.139: W/System.err(16287): at android.app.ActivityThread.main(ActivityThread.java:3691)
04-19 10:54:49.139: W/System.err(16287): at java.lang.reflect.Method.invokeNative(Native Method)
04-19 10:54:49.139: W/System.err(16287): at java.lang.reflect.Method.invoke(Method.java:507)
04-19 10:54:49.139: W/System.err(16287): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
04-19 10:54:49.139: W/System.err(16287): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
04-19 10:54:49.139: W/System.err(16287): at dalvik.system.NativeStart.main(Native Method)
04-19 10:54:49.189: W/System.err(16287): java.net.SocketException: Broken pipe
04-19 10:54:49.189: W/System.err(16287): at org.apache.harmony.luni.platform.OSNetworkSystem.write(Native Method)
04-19 10:54:49.194: W/System.err(16287): at dalvik.system.BlockGuard$WrappedNetworkSystem.write(BlockGuard.java:284)
04-19 10:54:49.194: W/System.err(16287): at org.apache.harmony.luni.net.PlainSocketImpl.write(PlainSocketImpl.java:472)
04-19 10:54:49.194: W/System.err(16287): at org.apache.harmony.luni.net.SocketOutputStream.write(SocketOutputStream.java:57)
04-19 10:54:49.194: W/System.err(16287): at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:87)
04-19 10:54:49.194: W/System.err(16287): at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:94)
04-19 10:54:49.194: W/System.err(16287): at android.net.http.AndroidHttpClientConnection.doFlush(AndroidHttpClientConnection.java:286)
04-19 10:54:49.194: W/System.err(16287): at android.net.http.AndroidHttpClientConnection.close(AndroidHttpClientConnection.java:232)
04-19 10:54:49.194: W/System.err(16287): at android.net.http.HttpConnection.closeConnection(HttpConnection.java:75)
04-19 10:54:49.194: W/System.err(16287): at android.net.http.Connection.httpFailure(Connection.java:454)
04-19 10:54:49.194: W/System.err(16287): at android.net.http.Connection.processRequests(Connection.java:295)
04-19 10:54:49.194: W/System.err(16287): at android.net.http.ConnectionThread.run(ConnectionThread.java:113)

在我的应用程序中,我使用 webview 从我的网站为移动设备构建本机应用程序。当我运行应用程序时,它的加载速度非常慢。调试时,我收到消息,指出我的应用程序是"管道断开"错误。我正在使用JSoup库从我的应用程序中的HTML获取值。我不知道 Jsoup 的确切错误或否。请帮我审查一下。非常感谢!

您可以增加超时:

doc = Jsoup.connect(url).timeout(10000).get();

另外,尝试连接另一个网站。

相关内容

  • 没有找到相关文章

最新更新