could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: 由于目标机器主动拒绝,无法建立连接。 (10061)

新手上路,请多包涵

嗨,我是新手 android 我无法运行 adb.exe 它给了我以下错误:

 ==>adb start-server
adb I  6108  5748 adb.cpp:219] Android Debug Bridge version 1.0.32
adb I  6108  5748 adb.cpp:219] Revision 09a0d98bebce-android
adb I  6108  5748 adb.cpp:219]
adb I  6108  5748 adb_client.cpp:126] _adb_connect: host:version
adb I  6108  5748 sysdeps_win32.cpp:742] could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)
adb I  6108  5748 adb_client.cpp:175] adb_connect: service host:start-server
* daemon not running. starting it now on port 5037 *
Cannot open 'nul': The system cannot find the file specified. (2)
* failed to start daemon *
error: cannot connect to daemon

这个错误到底是什么意思..?

 Cannot open 'nul': The system cannot find the file specified. (2)

这是什么错误..?

原文由 JDev 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1k
1 个回答

确保您已安装设备驱动程序和 adb 服务,并在 android device -> setting -> developer options 中激活 USB 调试,并且当您通过 USB 端口连接时(通过此命令: adb devices )

因此,当您通过 USB 连接时,请遵循以下命令:

1-stay 通过 USB 连接

2-连接到您的WIFI网络(电脑和移动设备)

3- ping DeviceIP (必须对您的设备执行 ping 操作)

4- adb kill-server

5- adb usb

6- adb tcpip 5556

7- adb connect "yourDeviceIP:5556"

8- adb devices (必须看到两个设备名称,其中一个是deviceIP:5556)

9-拔下USB线

然后就完成了!你可以测试你的应用程序

原文由 java acm 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
Stack Overflow 翻译
子站问答
访问
宣传栏