一、运行Appium,执行测试脚本,报错信息为:error: Failed to start an Appium session, err was: Error: Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.
如图所示:
原因分析:
这种错误并不是ANDROID_HOME环境变量没有配置,也不是配置有问题(你要确定自己的ANDROID_HOME环境变量一定要配对)
解决办法:
以管理员身份运行Appium即可
二、出错信息里含有"ps 'uiautomator',具体信息为 A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Users\sxie\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulat