2 gl5512968 gl5512968 于 2013.09.13 16:46 提问

android发送http请求很不稳定,有时连不上就一直连不上

09-13 16:41:55.705: W/System.err(29888): java.net.SocketTimeoutException: Connection timed out
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.platform.OSNetworkSystem.connect(Native Method)
09-13 16:41:55.705: W/System.err(29888): at dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:357)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:204)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:437)
09-13 16:41:55.705: W/System.err(29888): at java.net.Socket.connect(Socket.java:983)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:75)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:48)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:322)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:285)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:267)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1018)
09-13 16:41:55.705: W/System.err(29888): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:512)

常常报这个异常,手机是可以联网的,其他应用比如微博都能上。我的应用出现一次这个异常之后,每次都这样,要重启才能恢复

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!