[英]Connection Refused : IOException in android TCP/IP
im a newbie in android. 我是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.
当我尝试在两个Android设备之间建立TCP / IP连接时,我想问问是否有人知道为什么我得到此“连接拒绝” IOException。 I tried to ping both device and they are responding.
我尝试对两个设备执行ping操作,并且它们都在响应。 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.java:316)
E/TCP_IP connect thread( 7466): at com.neugent.WIFI.TCP_IP$ConnectThread.run(TCP_IP.java:291)
如果缺少INTERNET权限,请将此行添加到<application>
标记上方的Android.manifest
文件中。
<uses-permission android:name="android.permission.INTERNET/>
You don't have the INTERNET permission? 您没有INTERNET权限吗? 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).
那,或者您的Wifi没打开或者其他IP无法访问(例如您正试图通过WAN连接到LAN IP)。
对我来说,重新启动WIFI确实有效。...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.