android - 运行appium服务器时adb未检测到设备
问题描述
我已经用 tcp 连接了我的设备。它在 adb 设备上显示设备。
adb connect 192.168.0.112
connected to 192.168.0.112:5555
adb devices
List of devices attached
192.168.0.112:5555 device
但是当 appium 服务器运行时,它无法检测到设备。
[ADB] Using adb from /home/sher/Android/Sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
请人帮忙。我已经坚持了几天。我尝试了很多文章,但没有任何帮助。
解决方案
您应该将原始设备 ID 替换为“ip address:port”组合,然后运行您的测试脚本。在您的情况下(假设它是用 Java 编写的):
capabilities.setCapability("deviceId", "192.168.0.112:5555");
如果这没有帮助,请分享更多详细信息,例如设备功能和测试脚本。
推荐阅读
- lua - Lua - 在不使用带有 2 个单独脚本的调试库的情况下获取本地化变量或函数
- rest - 使用 HMAC 时随机数 RESTful 是如何实现的?
- r - R purr:将精度映射到预测对象并返回精度
- php - Xdebug 无法使用 XAMPP 开发服务器连接到 Windows 10 上的 VS Code
- google-apps-marketplace - 管理员中的代码 API 默认签名 gsuite 电子邮件
- python - 使用 FuncAnimation 动态更新 3d 散点图/点图中的 ax.text 位置
- powershell - 如何在Powershell中的文件中的每一行上打印/附加行索引号
- dc.js - Sharepoint 错误上的 aspx 页面:仅在呈现数据表时需要功能
- android - 如何在android studio中动态更改src属性?
- apache - httpd 服务正在启动,尽管它在重新启动时无法启动