【发布时间】:2016-11-27 00:29:56
【问题描述】:
我知道很多人在尝试在 Xcode 8 Beta 3 中编译他们的应用程序时遇到此错误,但是这里的可用答案似乎对我没有帮助。
在尝试运行我的应用程序时,我收到了通常的错误:(null): Found an unexpected Mach-O header code: 0x72613c21,当我扩展信息时,我得到了回报:
Effective srcDirs: {(
<DVTFilePath:0x6000008bb0c0:'/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos'>,
<DVTFilePath:0x6080002a00c0:'/Applications/Xcode-beta.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/swift/iphoneos'>
)}
error: Found an unexpected Mach-O header code: 0x72613c21
注意:我在文件路径中看到了一些关于 Swift_2.3 的内容,这可能会导致一些答案,但我不确定。
这也可能是我的 Podfile 的问题,所以我按照 this StackOverflow answer 中发布的说明将以下代码行粘贴到我的 podfile 中,这样最后我的 podfile 看起来像这样:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'Roast' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/AdMob'
pod 'JSQMessagesViewController'
target 'RoastTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'RoastKeyboard' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
# Pods for RoastKeyboard
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
end
end
end
我更新了我的 pod。
然而,这实际上并没有起到任何作用。
这是一个超级烦人的错误,因为我在过去的两个小时里刚刚修复了我的代码中的错误,现在我得到了一个甚至可能不是我的错的错误。
如果有人可以帮助我,那就太棒了。谢谢!
【问题讨论】:
-
我遇到了同样的错误。似乎是 Crashlytics 框架(可能还有其他框架)的问题。记录雷达以优先处理问题。与此同时,你可以不链接到有问题的框架,或者如果可以的话,试试非 beta 版的 Xcode。
-
我有同样的错误。这个恼人的错误有什么解决办法吗?
-
今天也被它咬了。建议的任何事情都不适合我。我没有使用 Crashlytics。
-
@TapForms 是的,我尝试了一切,但无法弄清楚。我降级了 Xcode 和我的 iOS 版本,至少现在它是稳定的。以为我会在 iOS 10 开发上抢占先机,但现在估计不行了????