无法反向运行 adb (React-Native) [英] Could not run adb reverse (React-Native)

查看:29
本文介绍了无法反向运行 adb (React-Native)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建成功

总时间:2 分 6.65 秒运行 C:UsersarnoldAppDataLocalAndroidsdk;/platform-tools/adb -s 192.168.95.101:5555 反向 tcp:8081 tcp:8081无法反向运行 adb:spawnSync C:UsersarnoldAppDataLocalAndroidsdk;/platform-tools/adb ENOENT在 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)...

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)...

构建成功,但没有显示在 GenyMotion 模拟器中.

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

我在 Android 5.0.0 (API 21) 上运行

i running on Android 5.0.0 (API 21)

推荐答案

您可以单击设备选项按钮,或者如果您的设备不存在它,请使用 adb shell input keyevent 82 命令和从菜单中选择 Dev Settings,然后从 DEBUGGING 部分选择 Debug server host &设备端口 并输入您的PC 的IP(您可以在Windows 的ipconfig 命令中找到您的IP),例如192.168.1.12:8081.

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.

请注意:

  • 您的设备和电脑必须在同一网络上
  • 可以从节点窗口中找到主机端口,例如:Running Metro Bundler on port 8081.

React 原生选项菜单:

节点窗口和成功加载包

这篇关于无法反向运行 adb (React-Native)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆