我已将设备与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...
请留下帮助。我已经坚持了几天。我尝试了许多文章,但没有任何帮助。
答案 0 :(得分:0)
您应使用“ ip address:port”组合替换原始设备ID,然后运行测试脚本。 就您而言(假设它是用Java编写的):
capabilities.setCapability("deviceId", "192.168.0.112:5555");
如果这没有帮助,请共享更多详细信息,例如设备功能和测试脚本。