Today, I wrote a demo program to test Android connect with PC. theSocket = new Socket("192.168.0.1", 4444); 1. IP address must use this server's IP which is connected to the network, can't use 127.0.0.1 2. Attention! You must add uses-permission on the AndroidManifest.xml, the type of permission is " android.permission.INTERNET"