Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
389 views
in Technique[技术] by (71.8m points)

android - Could not run adb reverse (React-Native)

BUILD SUCCESSFUL

Total time: 2 mins 6.65 secs Running C:UsersarnoldAppDataLocalAndroidsdk;/platform-tools/adb -s 192.168.95.101:5555 reverse tcp:8081 tcp:8081 Could not run adb reverse: spawnSync C:UsersarnoldAppDataLocalAndroidsdk;/platform-tools/adb ENOENT Starting the app on 192.168.95.101:5555 (C:UsersarnoldAppDataLocalAndroidsdk;/platform-tools/adb -s 192.168.95.101:5555 shell am start -n com.testproject/com.testproject.MainActivity)...

The build successful but it's not shown in GenyMotion emulator.

i running on Android 5.0.0 (API 21)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can click the device option button, or if it doesn't exist for your device use adb shell input keyevent 82 command and select Dev Settings from menu, and then from the section DEBUGGING choose Debug server host & port for device and enter your PC's IP (you can find your IP from ipconfig command for Windows) for example 192.168.1.12:8081.

after that, you can reload your application from options menu or restart your application.

Please pay attention:

  • Your device and pc must be on the same network
  • Host port can be found from node window, for example: Running Metro Bundler on port 8081.

React-native option menu:

React-native option menu

Node window and successful Bundle loading enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...