React-Native Error: spawnSync adb ENOENT

Aug 9, 2022


error Failed to start the app. Error: spawnSync adb ENOENT

If you have received this error, this means that your Android platform tools are not being set correctly. According to React-Native ANDROID SDK environment instructions, you need to add the following lines to your $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file:

export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools

My .zshrc looks the following:

export JAVA_HOME="/Applications/Android"
export ANDROID_SDK_ROOT="/Users/aurimas/Library/Android/sdk"
export PATH="$PATH:/Users/aurimas/Tools/flutter/bin"
export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools"