How can I access my localhost from my Android device?

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, the phone browser can’t connect to the same web server on my laptop. The phone is connected to the laptop using a USB cable. If I run the
adb devices command, I can see my phone.

What am I missing?

43 s
43

Leave a Comment