I'm running a local http server on port 3000 and i'd like to access that server using an Android emulator. I've tried the following in the browser:
With each of these i'm given this error:
Interestingly when accessing the same in chrome on my desktop:
localhost:3000 // works
127.0.0.1:3000 // doesn't work
Perhaps this is connected? I'm not sure why 127.0.0.1:3000
doesn't work, but that might be a different hurdle altogether.
My /etc/hosts
file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
I've already tried reloading (& disabling) my firewall and proxies.
The emulator i'm using is:
Mac, Android Studio 1.5.1
Emulator : Nexus 5 - API 21, Android 5.0 x86
Use following Service
It will give you a tunnel to localhost and give you a URL which you can use from anywhere in the world ;)