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

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

问题描述

成功构建

总时间:2分钟6.65秒 运行C:\ Users \ arnold \ AppData \ Local \ Android \ sdk;/platform-tools/adb -s 192.168.95.101:5555反向tcp:8081 tcp:8081 无法运行ADB反向:spawnSync C:\ Users \ arnold \ AppData \ Local \ Android \ sdk;/platform-tools/adb ENOENT 在192.168.95.101:5555(C:\ Users \ arnold \ AppData \ Local \ Android \ sdk;/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:\Users\arnold\AppData\Local\Android\sdk;/platform-tools/adb -s 192.168.95.101:5555 reverse tcp:8081 tcp:8081 Could not run adb reverse: spawnSync C:\Users\arnold\AppData\Local\Android\sdk;/platform-tools/adb ENOENT Starting the app on 192.168.95.101:5555 (C:\Users\arnold\AppData\Local\Android\sdk;/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 & port for device,然后输入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.

请注意:

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

反应本机选项菜单:

节点窗口和成功的捆绑包加载

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

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