I am trying to connect (via TCP) to a server running on my computer from an Android device. I have android.permission.INTERNETin my manifest file:
android.permission.INTERNET
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
I can connect using the emulator, but trying from the device causes an error:Android Socket: java.net.SocketException: No route to host
Android Socket: java.net.SocketException: No route to host
Someone can help.
Turned off Wi-Fi on my Android device, and then turned it back on and it worked.
The address 192.168.1.114 is the DHCP address (dynamically) assigned by your router to your computer. As a result, it is displayed in the emulator.
, Wi-Fi, Android, , / 192.168.1.114. , 192.168.1.114 Android.
192.168.1.114 Android, , , DNS- .
. , Win7 .