aapium报错 An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device in 21723ms.问题,已解决

发布时间 2023-06-16 09:50:38作者: 肥仔鸭

现象:

1、appium日志存在报错信息:

(1)中间:adb failed to start daemon *

(2)结尾:POST /wd/hub/session 500 287ms

2、appium图形界面设置参数后,点击start session报错提示

An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device in 21723ms.

3、执行adb shell

提示:error:device not found

 

 

原因:

adb.exe出问题,无法成功连接设备

 

解决方案:

1、打开夜神模拟器

2、运行cmdcd到夜神模拟器安装目录的bin文件夹下

3、执行nox_adb connect 127.0.0.1:62001连接到模拟器

4、执行adb shell,发现可以正常连接(说明模拟器的adb程序没有问题,将android sdk目录下的adb程序替换即可)

5、将模拟器下的nox_adb.exe复制到桌面,并改名为adb.exe

6、复制到AndroidSdk目录下的platform-tools文件中,替换原有的adb.exe

7、重新cmd,连接设备(adb connect),而后执行adb shell,无报错信息

8、重新执行程序,即可成功调起指定的app页面