Connection to LocalHost/10.0.2.2 from Android Emulator timed out

前端 未结 3 933
长发绾君心
长发绾君心 2020-12-06 17:40

Although this question has been asked multiple times in StackOverflow and I went through many of them, still I couldn\'t resolve my issue or I am not able to find out the ro

3条回答
  •  半阙折子戏
    2020-12-06 18:14

    I have figured out the reason why it was not working. There were two issues --

    1. The IP Address was not correct. So I changed the IP Address from 10.0.2.2 to the IPv4 address - which can be obtained on windows by typeing ipconfig in the command prompt and see link for linux.

    2. Also the port number 8080 was not correct. I have set my own port number in httpd.conf file, like ##Listen 12.34.56.78:8383Listen 0.0.0.0:8383Listen [::0]:8383##, under Apache and I used the same.

    After changing both and re-starting the WAMP server, it worked like a charm.

提交回复
热议问题