Expo cannot reach the Android emulator on port 5554
could not connect to TCP port 5554: cannot connect to 127.0.0.1:5554Short answer
Port 5554 is the emulator's console port, with adb on 5555. Expo cannot connect when no emulator is running there, when adb does not list it, or when two different adb versions fight over the server. Start the emulator first, check adb devices, then restart the adb server.
Fix it fast
1Find out which cause you have
Ask adb what it can see. An emulator that is up shows as emulator-5554 with the state device.
adb devices emulator -list-avds2Match what you see, then jump to its fix
- 1
adb devices lists nothingThe emulator is not runningFix - 2
The emulator window is open, but adb devices is empty or shows it as offlineadb does not show the emulator, or its server is staleFix - 3
adb: command not found, or adb server version (xx) doesn't match this client (xx); killing...adb is not on your PATH, or two adb versions are installedFix
- 1
What does the error look like?
could not connect to TCP port 5554: cannot connect to 127.0.0.1:5554
Cause 1 of 3
The emulator is not running
1Check
The first emulator on a machine takes console port 5554 and adb port 5555. If no emulator is started, nothing listens there.
adb devices2Fix
Start an emulator from the Device Manager in Android Studio, or from the terminal with one of the names from the list, and wait until it has fully booted. Then run Expo.
emulator -avd Pixel8_API_34
npx expo start --android3Verify
adb lists the emulator with the state device.
adb devicesConfirmed by developer.android.com
Cause 2 of 3
adb does not show the emulator, or its server is stale
1Check
The adb server may have started after the emulator, or an old server is still running. If you started the emulator with an odd -port value between 5554 and 5584, it can also stay invisible to adb.
adb devices -l
ps aux | grep "[e]mulator"2Fix
Stop the adb server and start it again. If you pass -port, use an even number.
adb kill-server
adb start-server
adb devices3Verify
The emulator now appears as emulator-5554 with state device.
adb devicesConfirmed by developer.android.com
Cause 3 of 3
adb is not on your PATH, or two adb versions are installed
1Check
Expo needs adb in your terminal. Set ANDROID_HOME and add platform-tools and emulator to PATH. If the version message appears, you have more than one adb install.
echo $ANDROID_HOME
which -a adb
adb version2Fix
Add the SDK folders to your shell profile and reload it, then use the adb from the SDK's platform-tools folder.
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools3Verify
adb version prints once, from the SDK folder.
which adb && adb versionConfirmed by docs.expo.dev
How do I stop it coming back?
- Start the emulator and wait for the home screen before you run npx expo start.
- Keep one adb install, the one in the Android SDK platform-tools folder.
- Run adb kill-server when you switch between several emulators or physical devices.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
The phone shows as unauthorized and Android Studio will not run the app
adb devices lists the phone but Android Studio cannot deploy to it
An unauthorized phone means it has not trusted this computer's RSA key.
3 causes, each with a fixMobile apps
Android Studio cannot pair the phone over Wi-Fi
The Pair devices over Wi-Fi dialog lists no device
Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.
4 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile apps
adb tcpip 5555 fails because no device is found
adb: more than one device/emulator
adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.
4 causes, each with a fix