记录:
1、重新执行一次 -> 现象上来看,发现手机上没有打开目标APP,一直报相同错误
Original error: The instrumentation process cannot be initialized
2、报错里有:at UiAutomator2Server.startSession,初步怀疑是 io.appium.uiautomator2.server app问题
查看 Config 里 skipServerInstallation: true
改成 skipServerInstallation: false
3、重新执行一次,成功✅
4、然后再改下 skipServerInstallation: true
(这样下次执行,也不会重复安装io.appium.uiautomator2.server)
根本原因:
新设备没有安装 io.appium.uiautomator2.server,
并且本地配置里 skipServerInstallation: true,
->
这样就跳过安装io.appium.uiautomator2.server ,
导致新设备无法正常启动server
参考:https://blog.csdn.net/YUICUI/article/details/112468679