Issue
What can I do in the Android emulator to connect it to my localhost web server page at http://localhost
or http://127.0.0.1
?
I've tried it, but the emulator still takes my request like a Google search for localhost or worse it says that it didn't found the page while my web server is normally running.
Solution
The localhost refers to the device on which the code is running, in this case the emulator.
If you want to refer to the computer which is running the Android simulator, use the IP address 10.0.2.2 instead.
You can read more from here.
Answered By - Primal Pappachan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.