Sumit Odich
Sumit Odich

Reputation: 13

I'm getting below problem while running my React-native Application

Failed to connect to development server using "adb reverse": spawnSync /home/sumit/Android/platform-tools/adb ENOENT

I also Tried using $ adb reverse tcp:8081 tcp:8081 but no Luck.

Upvotes: 1

Views: 987

Answers (1)

matusalem
matusalem

Reputation: 2531

Now I am updating my app from RN 0.58 to 0.61 and I was facing the same issue. I use to upgrade RN projects by copy-paste my src to a fresh bare RN project. According to new guidelines for MacOS users I had to remove CLI, upgrade node and switch to use npx react-native instead of previous RN CLI.

I figured out that I have to set env variable ANDROID_HOME properly - full path way in your .bash_profile file:

export ANDROID_HOME="/Users/matusalem/libs/android-sdk"

do no use relative path like this:

export ANDROID_HOME="~/libs/android-sdk" // wrong

Upvotes: 1

Related Questions