Appium异常:An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT …

一、异常如下

An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path.

图片[1] - Appium异常:An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT … - 三酷猫笔记

看上面的报错,我们知道是环境变量:ANDROID_HOME 或者 ANDROID_SDK_ROOT设置的有问题。

二、解决办法

1.设置环境变量

通过设置变量名,这种来添加环境变量。不要习惯性的直接在Path里面添加完整路径这种方式!

图片[2] - Appium异常:An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT … - 三酷猫笔记

同样的 JAVA_HOME 也要用变量名的方式添加环境变量!

2.管理员身份运行Appium

图片[3] - Appium异常:An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT … - 三酷猫笔记

3.编辑配置路径查看有没有配置上

图片[4] - Appium异常:An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT … - 三酷猫笔记

上如:路径配置正确后,就可以正常使用啦!

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享