Azure DevOps管道中的迦太基复制框架失败

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

我的项目使用Carthage并在本地成功构建,但是当我尝试使用Microsoft Hosted Agent上的Azure DevOps管道构建它时,出现此错误:

以下构建命令失败:

PhaseScriptExecution迦太基\复制\框架/Users/runner/Library/Developer/Xcode/DerivedData/My-Scheme-euhffgcbmkrrcmfffhaqpabtlubp/Build/Intermediates.noindex/My-Scheme.build/Release-iphoneos/My-Scheme。 -DB5433C1239AF75F00C0B252.sh(1个失败)

[错误]错误:/ usr / bin / xcodebuild失败,返回码:65

这是我的迦太基复制框架构建阶段:

/usr/local/bin/carthage copy-frameworks

我的猜测是,Azure机器的配置有所不同,但我不知道该怎么修复或如何修复。

我也收到此错误:

❌致命错误:/Applications/Xcode_10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:输入文件:/ Users / runner / Library / Developer / Xcode / DerivedData / My-Scheme -euhffgcbmkrrcmfffhaqpabtlubp / Build / Products / Release-iphoneos / Realm.framework.dSYM / Contents / Resources / DWARF / Realm自打开以来已更改(未定义错误:0)

azure-devops carthage
1个回答
0
投票

即使迦太基在本地没有引起任何问题,如果您的方案构建了多个运行carthage copy-frameworks命令的目标,代理机器也可能会抛出与上面的错误类似的错误:Realm changed since opened (Undefined error: 0)

似乎正在同时访问同一文件,因为正在并行构建多个目标。就我而言,正在为我的应用目标和测试目标运行carthage copy-frameworks。一个解决方法是让您的方案仅构建应用程序目标:

Product > Scheme > Edit Scheme > Build (n targets) > Target to Remove > Select -
© www.soinside.com 2019 - 2024. All rights reserved.