How can I access my localhost from my Android device?

前端 未结 30 2830
面向向阳花
面向向阳花 2020-11-21 05:53

I\'m able to access my laptop web server using the Android emulator, I\'m using 10.0.2.2:portno works well.

But when I connect my real Android phone, th

30条回答
  •  孤城傲影
    2020-11-21 06:27

    EASIEST way (this worked flawlessly for me) is to locally host your site at 0.0.0.0: and to access it using mobile devices, use :/ in browser.

    • To know your local ipv4 address, just type ipconfig in cmd
    • ANY device connected to the SAME network can access this url.

提交回复
热议问题