React Native adb reverse ENOENT
I got the same issue. I updated my ANDROID_HOME env variable again it worked for me.
Follow this React-native android-setup documentation
ex:
export ANDROID_HOME=~/Library/Android/sdk
Windows:
set ANDROID_HOME=c:/Users/whoever/AppData/Local/Android/Sdk
macOS Mojave and earlier or bash users:
1 - Open your bash profile:
open .bash_profile
Add this to your bash_profile:
export ANDROID_SDK=/Users/<your_computer_name>/Library/Android/sdk
export PATH=/Users/<your_computer_name>/Library/Android/sdk/platform-tools:$PATH
Save and close
Compile your changes
source ~/.bash_profile
For macOS Catalina and zsh users:
Starting with macOS Catalina, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.
On your Mac:
Open your .zshrc file:
open ~/.zshrc
If .zshrc file not exist, you need to create one using touch
& open.
touch ~/.zshrc
Add this to your .zshrc file
export ANDROID_SDK=/Users/<your_computer_name>/Library/Android/sdk
export PATH=/Users/<your_computer_name>/Library/Android/sdk/platform-tools:$PATH
Save and close
Compile your changes
source ~/.zshrc
Edit: Updated answer for macOS Catalina and zsh users.
react native spawnSync $HOME/Android/Sdk/platform-tools/adb ENOENT at Object.spawnSync
The error was that there was a seperate .bashrc file for sudo user which I was not updating. Updating that file with proper paths fixed my error.
react-native - 'adb' is not recognized as an internal or external command
I changed the enviroment variable ANDROID_HOME
value from C:\Users\User\AppData\Local\Android\Sdk\
to C:\Users\User\AppData\Local\Android\Sdk\platform-tools\
and it worked...
How to solve Could not run adb reverse: spawnSync C\:\\Users\\Name\\AppData\\Local\\Android\\Sdk/platform-tools/adb ENOENT in React native project?
Looks like the path is using a mixture of backslashes and forward slashes:
C:\Users\UserName\AppData\Local\Android\Sdk/platform-tools/adb
I would use that as the starting point for your investigation. Does RN know you are using Windows? Are you using a suitable CLI such as the one provided by Git SCM? I suspect you will have issues if you are running directly from cmd.
Related Topics
Android Button Has Setontouchlistener Called on It But Does Not Override Performclick
Genymotion Unable to Start the Genymotion Virtual Device
Android Java - Joda Date Is Slow
Fcm (Firebase Cloud Messaging) Push Notification with ASP.NET
How to Start an Android Application from the Command Line
How to Capture and Save an Image Using Custom Camera in Android
Android - Swipe to Delete Recyclerview
Android: How to Convert Whole Imageview to Bitmap
Libgdx Spritebatch Render to Texture
How to Create Converter for My Class in Android Retrofit Library
How to Add Bulleted List to Android Application
Android How to Programmatically Hide Launcher Icon
How to Avoid Delay in Android Gcm Messages/Change Heartbeat
(Deprecated) Fragment Onoptionsitemselected Not Being Called
App Always Starts Fresh from Root Activity Instead of Resuming Background State (Known Bug)
How Does Doze Mode Affect Background/Foreground Services, With/Without Partial/Full Wakelocks
Run-As Package 'A.B.C' Is Unknown - Galaxy S4 Jellybean or Android 4.3