[Android] Unable to reach localhost using Android emulator
by Riley MacDonald, February 19, 2019

While working with a spring boot application server running on my local machine I was unable to hit the server instance with an Android emulator. The Android emulator proxy was configured for localhost:8888 (the Charles Proxy default port) using the settings GUI but I was unable to reach any instances running at localhost.

Use 10.0.2.2
Android emulators interpret the localhost address as their own localhost. In order to reach the host machine localhost use 10.0.2.2.

Open the comment form

Leave a comment:

Comments will be reviewed before they are posted.

User Comments:

Be the first to leave a comment on this post!