How can I access my localhost from my Android device?

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

    "Port forwarding on Chrome for Android makes it easy to test your development site on mobile. It works by creating a listening TCP port on your mobile device that maps to a particular TCP port on your development machine. Traffic between these ports travels through USB, so the connection doesn't depend on your network configuration."

    More details here: https://developer.chrome.com/devtools/docs/remote-debugging#port-forwarding

提交回复
热议问题