錯誤描述:
Command CompileSwiftSources failed with a nonzero exit code
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: project)
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc....
QQ20181012-110752.png
QQ20181012-110804.png
解決方法:
QQ20181012-110104.png
注:-F 這樣的錯誤一般是路徑不對問題瘦黑,可以重新設(shè)置Targets-BuildSetting-Search Paths 的Header Search Paths涂屁、Library Search Paths的路徑胁勺,直接僅留下第一行的$(inherited)猬腰,其余都刪除募谎,直接運行,不過本此的問題,發(fā)現(xiàn)直接刪除$(SRCROOT)/**就可以解決問題了.
有些failed with a nonzero exit code的問題直接clean一下,然后重新編譯就可以了榨乎,這個貌似是編輯器的問題。