How can I access my localhost from my Android device?

前端 未结 30 2852
面向向阳花
面向向阳花 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:34

    Simple. First and foremost make your your android device and computer is connected on thee same network.e.g router Open command prompt by windows+R and search for cmd then open. On the command type ipconfig and get the ipv4 address.

    NB: Firewall blocks access of your computer along network so you need to turn off firewall for the network if either public or private.

    How to turn off firewall Open control panel > System and security > windows firewall > on the left pane select turn on and off windows firewall. > Then select turn off windows firewall(not recommended)

    You are done

    then open your mobile device and run your ip address 192.168.1.xxx


提交回复
热议问题