10.0.2.2:8080 in a web browser in the emulator does not work

I have a wamp server in localhost. I tried to make an http request from my android app. But he can’t understand. Many say that 10.0.2.2:8080 will point to localhost from the emulator. So I tried to open it in a web browser from an emulator. I printed the url as "10.0.2.2/cifi/test.php". But the emulator detected an error like "net: CONNECTION_TIMED_OUT"

Explanation required: how to make my wamp server on the local machine listen on 10.0.0.2:8080 from the emulator browser.

+4
source share
4 answers

- ! "10.0.2.2:80/cifi/test.php". wamp . , !

0

Wamp Server, , .

wamp →

url http://10.0.2.2:8080/cifi/test.php http://1.0.2.2/cifi/test.php

+2

Weirdly, , .

0

, , , .

Maybe you could try my solution: fooobar.com/questions/47260 / ... .

0
source

Source: https://habr.com/ru/post/1524925/


All Articles