2016-07-23 56 views
3

我知道很多人在嘗試在Xcode 8 Beta 3中編譯它們的應用程序時出現此錯誤,但是這裏沒有可用的答案似乎對我有幫助。嘗試使用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 

我更新了我的豆莢。

但是,那實際上什麼也沒做。

這是一個超級煩人的錯誤,因爲我剛剛花了最近兩個小時修復了我的代碼中的錯誤,現在我得到的錯誤可能不是我的錯。

如果有人能幫助我,那會很棒。謝謝!

+1

我得到相同的錯誤。似乎是Crashlytics框架(可能還有其他)的問題。記錄雷達以優先考慮問題。與此同時,您可以不鏈接到違規框架,或者如果可以的話,嘗試非beta版本的Xcode。 – Mark

+0

我有同樣的錯誤。任何解決這個煩人的錯誤? – fdlr

+0

今天它也只是咬我一口。沒有任何建議爲我工作。我沒有使用Crashlytics。 –

回答

1

看起來這個問題在Xcode 8.0(測試版4)中已被修復。。所以你不需要嘗試以下的東西。

問題似乎與Xcode混淆工具鏈目錄路徑,當構建包括swift和objc頭。

一個解決辦法是

  1. 補丁SDK頭文件和編譯器的使用(愚蠢的事情 不喜歡新的頭!)或
  2. 使用舊的頭文件( 是偉大的,但有些事情不工作/存在一樣了)或
  3. 使用以下設置在Makefile以避免警告和編譯過程中 錯誤和鏈接:

CC =的/ usr /斌/鐺

CFLAGS = -fsigned炭-g -ObjC -fobjc的例外\ -Wall -Wundeclared選擇器-Wreturn型-Wnested-實習醫生\ -Wredundant- decls \ -Wbad-function-cast \ -Wchar-subscripts \ -Winline -Wwitwit -Wshadow \ -I/var/include \ -I/var/include/gcc/darwin/4。0 \ -D_CTYPE_H_ \ -D_BSD_ARM_SETJMP_H \ -D_UNISTD_H_

CPPFLAGS =

LD = $(CC)

LDFLAGS = -lobjc \ -F /系統/庫/框架\ - 框架的CoreFoundation \ -framework基金會\ -framework UIKit的\ -framework CoreGraphics在\ -L/usr/lib目錄-lc /usr/lib/libgcc_s.1.dylib \ -bind_at_load \ - 多ply_defined壓制

相關問題