I want to connect an android app to a server with java's ServerSocket
and Socket
classes.
I am using the following line at the client to connect to the server:
var socket = new Socket(InetAddress.getByName("192.168.1.21"), 59090);
("192.168.1.21" is my computer's ip)
Now, when I'm opening a simple java project file it is working, but when I'm trying this line in an android project and I run it through a simulator it throws the said exception and crashes.
Does anybody know why?