How do I access the http://localhost web server from the Android emulator in Eclipse?

Asked 2 years ago, Updated 2 years ago, 126 views

How do I connect to these local host web servers in the Eclipse Android Emulator http://localhost or http://127.0.1?

I tried both of the addresses above, but it only says that I couldn't find the page.

The server is working fine.

android genymotion android-emulator

2022-09-21 23:10

1 Answers

The localhost refers to the device on which the code is running, in this case the emulator.

If you do that, you will be connected to the local host of the Android device. In this case, to the local host of the emulator. If you want to access the web server on your computer, you can access it with 10.0.2.2 IP.


2022-09-21 23:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.