环境:appium server1.7.2 ;Android8.0.0;uiautomator2时,执行用例报错入下:[UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/Users/shifangfang/Downloads/android-sdk/platform-tools/adb -P 5037 -s WFF0216B23007876 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1';
解决方案:
1、升级appium server1.10.0解决问题
升级步骤:使用淘宝镜像来升级
1)npm install -g cnpm --registry=https://registry.npm.taobao.org
2)cnpm update -g appium@1.10.0
PS:如果升级不成功,那就执行先卸载,直接安装
1)npm uninstall appium
2)cnpm install -g appium@1.10.0
网友评论