Working with react native application, facing Detox Runtime Error while running test on android emulator.
I have configured android on my machine (macbook) and able to run the application on emulator. While executing the detox test produced the DetoxRuntimeError: There was no "adb" executable file in directory error.
I have tride below setup and configuration, doesen't work for me, any help will be appriciated.
Current android environment setup
.zshrc
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
export ANDROID_HOME=/Users/sagar/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export ANDROID_SDK_ROOT=~/Library/Android/sdk
Adb Version
> adb --version
Android Debug Bridge version 1.0.41
Version 34.0.5-10900879
Installed as /usr/local/bin/adb
Running on Darwin 23.5.0 (x86_64)
The main root cause is the path to the adb in platform-tools by updating the path in the configuration .zshrc file on mac machine helped to resolve the issue.
Update your.zshrc with code ~/.zshrc and source ~/.zshrc.
Configuration
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
export ANDROID_HOME=/Users/sagar/Library/Android/sdk
export PATH=$PATH:$ANDROID_ROOT/emulator
export PATH=$PATH:$ANDROID_ROOT/tools
export PATH=$PATH:$ANDROID_ROOT/tools/bin
export PATH=$PATH:$ANDROID_ROOT/platform-tools
export PATH=$PATH:~/.android-sdk-macosx/platform-tools/