xcode 由于 xcodebuild 失败,无法启动 WebDriverAgent:“找不到 Carthage 二进制文件。”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49251594/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:34:55  来源:igfitidea点击:

Unable to launch WebDriverAgent because of xcodebuild failure: "Carthage binary is not found."

xcodeappiumappium-iosappium-desktop

提问by timetraveler90

Every time i try to start appium desktop with the iOS capabilities i am getting the following error:

每次我尝试使用 iOS 功能启动 appium 桌面时,我都会收到以下错误:

Unable to launch WebDriverAgent because of xcodebuild failure: "Carthage binary is not found. Install using brew install carthageif it is not installed and make sure the root folder, where carthage binary is installed, is present in PATH environment variable.

由于 xcodebuild 失败,无法启动 WebDriverAgent:“找不到 Carthage 二进制文件。brew install carthage如果未安装,请使用安装并确保安装 carthage 二进制文件的根文件夹存在于 PATH 环境变量中。

Complete appium log can be found on the following link

可以在以下链接中找到完整的 appium 日志

Capabilities used for this are:

用于此的功能是:

{
"platformName": "iOS",
"deviceName": "iPhone X",
"app": "path/to/my/App.app",
"platformVersion": "11.2",
"automationName": "XCUITest",
"xcodeOrgId": "myXcodeOrgId",
"bundleId": "bundleIdOfMyApp"
}

which carthageoutput is /usr/local/bin/carthageand the version of carthage is 0.28.0

哪个迦太基输出是/usr/local/bin/carthage迦太基的版本是0.28.0

XCode version is Version 9.2 (9C40b)

XCode 版本为9.2 (9C40b)

回答by Wasiq Bhamla

You need to first install Carthage on your machine by executing below command on your terminal

您需要首先通过在终端上执行以下命令在您的机器上安装 Carthage

$ brew install carthage

For more details refer here.

有关更多详细信息,请参阅此处

回答by Gollen

I also encountered this problem.You can try to reinstall appium on macOS Desktop. https://github.com/appium/appium-desktop/releases/tag/v1.6.3select appium-desktop-1.6.3-mac.zip

我也遇到了这个问题,可以尝试在macOS桌面重新安装appium。 https://github.com/appium/appium-desktop/releases/tag/v1.6.3选择 appium-desktop-1.6.3-mac.zip

回答by MDK

Problem with Carthage Folder, Check in below path /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent

Carthage 文件夹的问题,请检查以下路径 /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent

Carthage FolderIf it is not there, Follow Below steps

迦太基文件夹如果不存在,请按照以下步骤操作

Step-1: For Appium 1.15.1 and above

步骤 1:对于 Appium 1.15.1 及更高版本

Open below path in Terminal $ cd /Applications/Appium.app/Contents/Resources/app/node_modules

在终端中打开以下路径 $ cd /Applications/Appium.app/Contents/Resources/app/node_modules

$ sudo chmod -R 777 . appium-webdriveragent/*

$ sudo chmod -R 777 。appium-webdriveragent/*

Step-2:goto 1) $ cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent

第 2 步:转到 1) $ cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent

2) sudo mkdir -p Resources/WebDriverAgent.bundle

2) sudo mkdir -p Resources/WebDriverAgent.bundle

3) sudo sh ./Scripts/bootstrap.sh -d

3) 须藤 sh ./Scripts/bootstrap.sh -d

Step-3:Build WebDriverAgent Project with sign

第 3 步:使用标志构建 WebDriverAgent 项目

Open below project in XCode /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj

在 XCode /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj 中打开以下项目