Answer the question
In order to leave comments, you need to log in
How to connect to local network using android emulator?
There is a server on windows (java) , as well as an android client. I launch a project in android studio through the emulator, and an error occurs that the socket cannot connect . "failed to connect to localhost: How to fix this ? Thanks!
Answer the question
In order to leave comments, you need to log in
Решение: зайти в консоль и узнать свой Ipv4 и написать его в host, в windows например надо вбить ipconfig
Добрый день! Во-первых. неплохо было бы более подробно описать проблему, хотя бы какой адрес сокета вы используете на клиенте/сервере.
В пределах одной подсети, адрес сокета на Android-клиенте необходимо прописывать в формате
private static final String SERVER3 = "ws://192.168.0.193:8080/web";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question