0
我的源代碼:套接字錯誤:d/AndroidRuntime:關閉VM
tvOut.setText("Connect...");
Log.d("my", "Connect...");
try {
InetAddress serverAddr = InetAddress.getByName("192.168.1.121");
Log.d("my", "InetAddress serverAddr...");
socket = new Socket(serverAddr, 3426);
Log.d("my", "socket = new Socket...");
...
的logcat:
12-11 00:16:36.605:d /我(1247):連接...
12-11 00:16:36.675:d /我(1247):InetAddress類serverAddr ...
12-11 00:16:36.715:d/AndroidRuntime(1247):關閉VM
哪裏錯誤?
檢查這裏的建議http://stackoverflow.com/questions/10662805/inetaddress-in-android –
插座=新的Socket(serverAddr ,3426);錯誤在這一行...爲什麼? – user3089740