求助 - 关于使用appium UiAutomator2 报错的问题

使用appium桌面版1.15.1版本,真机使用小米10 Ultra,启动参数如下

{
  "platformName": "Android",
  "platformVersion": "10.0.0",
  "deviceName": "Android Emulator",
  "appPackage": "cn.com.egova.handpark",
  "appActivity": "cn.com.egova.login.LoginActivity",
  "noReset": "True",
  "automationName": "uiAutomator2"
}

启动后报错

An unknown server-side error occurred while processing the command. 
Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

手机端自动安装的驱动软件版本如下



贴下完整日志看看

已解决,没有安装uiautomator2服务的话需要使用pip install -U uiautomator2安装

问题再次出现,uiautomator2卸载重装后仍会报错,appium服务日志如下
appium-server-logs.log (15.5 KB)

ps:用appium录制工具调试没问题,用python跑demo后报错,再用appium录制工具调试也会报错了,报错还是这个

An unknown server-side error occurred while processing the command. 
Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

如果把 "automationName": "uiAutomator2" 去掉也会有一样的报错,因为不填这个字段好像会默认使用uiAutomator2这个引擎

关闭