简体   繁体   中英

Failed to connect to development server using "adb reverse"

I'm running a react-native app with an android emulator running normal, but when I use the command "react-native run-android" that launch me this error :

warn Failed to connect to development server using "adb reverse": spawnSync C:\\Users\\HP-Envy\\AppData\\Local\\Android\\Sdk;/platform-tools/adb ENOENT

Please try this:

$ adb reconnect

This is not necessary in most cases, but just in case, let's reset your connection with your mobile and restart adb server. Finally:

$ adb reverse tcp:8081 tcp:8081

So, whenever your mobile device tries to access any port 8081 on itself it will be routed to the 8081 port on your PC.

I got the same issue. You need to update the ANDROID_HOME path of your system.

Paste this in your terminal

export ANDROID_SDK=/Users/<your_computer_name>/Library/Android/sdk
export PATH=/Users/<your_computer_name>/Library/Android/sdk/platform-tools:$PATH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM