ios - WebdriverAgent : linker command failed with exit code 1 (use -v to see invocation)

标签 ios mobile appium appium-ios

我正在尝试将 webdriveragent 构建到 iOS 真实设备上。直到昨天它工作正常。从那以后,我没有对盒子进行任何更新。我在编译时看到以下错误:

\Ld/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/WebDriverAgentLib 正常 arm64(目标:WebDriverAgentLib)
cd/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
导出 IPHONEOS_DEPLOYMENT_TARGET=11.3
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -L/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos -F/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos - F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS -F/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/Mac -filelist/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentLib.build/Objects-normal/arm64/WebDriverAgentLib.LinkFileList -install_name @rpath/WebDriverAgentLib.framework/WebDriverAgentLib -Xlin ker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=11.3 -dead_strip -Xlinker -object_path_lto -Xlinker/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentLib.build/Objects-normal/arm64/WebDriverAgentLib_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lxml2 -framework RoutingHTTPServer -framework YYCache -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentLib.build/Objects-normal/arm64/WebDriverAgentLib_dependency_info.dat -o/Users/qaautomation/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/WebDriverAgentLib

架构 arm64 的 undefined symbol :
“_OBJC_CLASS_$_XCElementSnapshot”,引用自:
l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBIsVisible 在 XCUIElement+FBIsVisible.o
XCUIElement+FBUID.o 中的 l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBUID
XCUIElement+FBWebDriverAttributes.o 中的 l_OBJC_$_CATEGORY_XCElementSnapshot_$_WebDriverAttributes
XCUIElement+FBWebDriverAttributes.o 中的 objc-class-ref
XCUIElement+FBUtilities.o 中的 objc-class-ref
XCUIElement+FBAccessibility.o 中的 l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBAccessibility
l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBScrolling in XCUIElement+FBScrolling.o
...
ld:未找到架构 arm64 的符号
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)


我正在使用最新的 Xcode 和 appium
有人可以帮我解决这个问题吗?

最佳答案

在 WebDriverAgentLib 目标的其他链接器标志中添加 -Wl,-U,"_OBJC_CLASS_$_XCElementSnapshot"。

关于ios - WebdriverAgent : linker command failed with exit code 1 (use -v to see invocation),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52504743/

相关文章:

ios - iPhone 如何在按下音量键时隐藏音量覆盖

ios - 发送数据包时核心蓝牙变慢

ios - 如何在 collectionview 中添加 PageviewController

java - "java_client"更新后无法按下组合键

java - Appium + Android studio -> 重复条目 : com/thoughtworks/selenium/CommandProcessor. 类

ios - NSExceptionAllowsInsecureHTTPLoads 和 NSTirdPartyExceptionAllowsInsecureHTTPLoads 有什么区别?

java - 确认在 couchbase 中上传文档

jquery Mobile url 添加 # 标签,该标签会破坏 Internet Explorer 中的表单

mobile - 是否可以在页面中嵌入适用于移动设备的 YouTube 视频,而不是链接到 YouTube?

css - 使用 xpath 或 css 选择器解析混合移动应用程序中的所有元素