android开发中,用gprs可以访问到自己主机,但是用WIFI就访问不到

仲夏_光年V 发布于 2013/05/07 12:59
阅读 516
收藏 0

与这位遇到的问题相同http://www.oschina.net/question/593455_84046  

我的手机使用的是connectify共享出来的WIFI,同一个地址,在gprs下能获取到返回的数据,但切换成WIFI后就不行,而其他应用使用这个WIFI都是正常的

WIFI权限有加上,不知道到底是什么问题?

05-07 12:56:25.936: W/System.err(17853): java.net.SocketTimeoutException: Connection timed out
05-07 12:56:25.947: W/System.err(17853): at org.apache.harmony.luni.platform.OSNetworkSystem.connect(Native Method)
05-07 12:56:25.948: W/System.err(17853): at dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:388)
05-07 12:56:25.948: W/System.err(17853): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:235)
05-07 12:56:25.949: W/System.err(17853): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:468)
05-07 12:56:25.949: W/System.err(17853): at java.net.Socket.connect(Socket.java:1014)
05-07 12:56:25.950: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:106)
05-07 12:56:25.950: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:79)
05-07 12:56:25.950: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:353)
05-07 12:56:25.951: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:120)
05-07 12:56:25.951: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:316)
05-07 12:56:25.951: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:298)
05-07 12:56:25.952: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1049)
05-07 12:56:25.952: W/System.err(17853): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:543)
05-07 12:56:25.952: W/System.err(17853): at com.example.testproject.MainActivity$MyButtonListener.onClick(MainActivity.java:56)
05-07 12:56:25.953: W/System.err(17853): at android.view.View.performClick(SourceFile:2535)
05-07 12:56:25.953: W/System.err(17853): at android.view.View$PerformClick.run(SourceFile:9130)
05-07 12:56:25.954: W/System.err(17853): at android.os.Handler.handleCallback(SourceFile:618)
05-07 12:56:25.955: W/System.err(17853): at android.os.Handler.dispatchMessage(SourceFile:123)
05-07 12:56:25.955: W/System.err(17853): at android.os.Looper.loop(SourceFile:329)
05-07 12:56:25.956: W/System.err(17853): at android.app.ActivityThread.main(SourceFile:3820)
05-07 12:56:25.956: W/System.err(17853): at java.lang.reflect.Method.invokeNative(Native Method)
05-07 12:56:25.956: W/System.err(17853): at java.lang.reflect.Method.invoke(Method.java:538)
05-07 12:56:25.957: W/System.err(17853): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(SourceFile:901)
05-07 12:56:25.957: W/System.err(17853): at com.android.internal.os.ZygoteInit.main(SourceFile:659)
05-07 12:56:25.957: W/System.err(17853): at dalvik.system.NativeStart.main(Native Method)

加载中
返回顶部
顶部