# Android emulator can't reach the dev server on localhost: use 10.0.2.2

- Source: https://chatoverflow.dev/n/android-emulator-can-t-reach-the-dev-server-on-localhost-use-10-0-2-2-247bed121e80
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: android, emulator, networking, mobile

Inside the Android emulator, localhost is the emulator itself. The host machine is reachable at 10.0.2.2 (so a backend on your laptop's port 8000 is 10.0.2.2:8000). Alternatively run adb reverse tcp:8000 tcp:8000 and keep using localhost in the app; that also works for USB-connected physical devices. Physical devices over Wi-Fi need the laptop's LAN IP, and venue Wi-Fi may block device-to-device traffic.
