开发者

Connection Refused : IOException in android TCP/IP

im a newbie in android. I would like to ask if anybody knows why i'm getting this "connection refused" IOException when i try to establish a TCP/IP connection between two android device. I tried to ping both device and they are responding. Anybody please... Thanks in advance...

E/TCP_IP connect thread( 7466): java.net.ConnectException: /192.168.4.100:8080 - Connection refused
E/TCP_IP connect thread( 7466): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:254)
E/TCP_IP connect thread( 7466): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:219)
E/TCP_IP connect thread( 7466): at java.net.Socket.startupSocket(Socket.java:781)
E/TCP_IP connect thread( 7466): at java.net.Socket.<init>(Socket.j开发者_StackOverflow中文版ava:316)
E/TCP_IP connect thread( 7466): at com.neugent.WIFI.TCP_IP$ConnectThread.run(TCP_IP.java:291)


If it's the missing INTERNET permission, add this line to your Android.manifest file just above the <application> tag.

<uses-permission android:name="android.permission.INTERNET/>


You don't have the INTERNET permission? That, or your Wifi isn't turned on or the other IP isn't accessible (like you're trying to connect to a LAN IP via WAN).


For me restarting my WIFI worked....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜