Appium Android SDK 错误:本地文件系统上不存在 SDK 根文件夹,即使在 Mac 中包含 SDK _ root 的系统变量后也是如此

问题描述 投票:0回答:2

错误:创建会话失败。 处理命令时发生未知的服务器端错误。原始错误:本地文件系统上不存在 Android SDK 根文件夹“/rekha/Library/Android/sdk”。阅读 https://developer.android.com/studio/command-line/variables 了解更多详细信息 在 Object.startWebDriverSession (/Users/rekha/Web/appium-playground/node_modules/webdriver/build/utils.js:68:15) 在 processTicksAndRejections (节点:内部/进程/task_queues:94:5) 在 async Function.newSession (/Users/rekha/Web/appium-playground/node_modules/webdriver/build/index.js:58:45) 在 async Object.exports.remote (/Users/rekha/Web/appium-playground/node_modules/webdriverio/build/index.js:67:22) 在异步主(/Users/rekha/Web/appium-playground/index.js:19:20)

appium
2个回答
0
投票

我也遇到了同样的问题

我做了以下事情: 第一 我执行 appium-doctor --android 来识别设置错误。就我而言,我的 JAVA_HOME 无效。

第二 使用命令 ECHO $SHELL 来确定我们是否使用 bash、zsh 或 zshrc。就我而言是 zsh

第三 从终端使用 打开 zshrc 并使用有效路径编辑我们的 JAVA_HOME ,对于我们的 ANDROID_HOME 也是如此。 不要忘记能够编辑,使用命令 i 保存更改

第四 执行命令:exec zsh -l 重启终端,无需重启我们的mac 最后,再次执行appium doctor并再次执行你的appium。


0
投票
Run Appium-doctor --android to see where it locates the Android Sdk. 
Copy that value an paste it in the Android edit configurations. 
© www.soinside.com 2019 - 2024. All rights reserved.