Connection refused: IOException in android TCP / IP

im new to android. I would like to ask if anyone knows why I get this “connection refused” IOException when I try to establish a TCP / IP connection between two Android devices. I tried ping on both devices and they respond. Anyone 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) 
0
source share
3 answers

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

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

+3
source

Don't have INTERNET permission? This or your Wi-Fi is not turned on or another IP is not available (for example, you are trying to connect to LAN-IP via WAN).

+1
source

For me, rebooting my WIFI worked ....

0
source

All Articles