appium安装运行报错的解决方案
- 电脑硬件
- 2025-07-21 18:58:12

appium版本2.3
java17
运行报错:
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName 'UiAutomator2' and platformName 'android'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: Could not find installed driver to support given caps)
原因:由于没有安装appium driver
使用下面的步骤:
appium driver install uiautomator2但是出现了下面的报错:
Error: ✖ Encountered an error when installing package: npm command 'install --save-dev --no-progress --no-audit --prefer-offline --omit=peer --save-exact --global-style --no-package-lock appium-uiautomator2-driver --json' failed with code 1. npm ERR! [22:01:34] Error installing Chromedriver: read ECONNRESET npm ERR! [22:01:34] Error: read ECONNRESET npm ERR! [22:01:34] Downloading Chromedriver can be skipped by setting the'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
这个日志显示是由于需要设置APPIUM_SKIP_CHROMEDRIVER_INSTALL,但是没说怎么设置。
Downloading Chromedriver can be skipped by setting the'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
墙了一下给出了答案:
APPIUM_SKIP_CHROMEDRIVER_INSTALL=1 appium driver install uiautomator2安装成功;
appium安装运行报错的解决方案由讯客互联电脑硬件栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“appium安装运行报错的解决方案”