簡體   English   中英

Xcode 10.0 錯誤“Command /Applications/Xcode 10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失敗,退出代碼為 1”

[英]Xcode 10.0 Error "Command /Applications/Xcode 10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1"

當我在 XCode 版本 10.0 上編譯我的代碼時,我收到了這個導致編譯失敗的錯誤:

我會嘗試所有可能但無法解決錯誤

  • 清理我的項目alt + Shift + Command + K
  • 刪除 ~/Library/Developer/Xcode/DerivedData
  • 豆莢更新

如果您查看錯誤上方,XCode 會告訴您哪個類被添加/聲明了兩次,導航到它並刪除引用。 構建,你就可以開始了。

一個建議是將 pod 更新到最新版本。 我最近陷入了類似的問題。 所以我這樣做了,它對我有用。 我的 pod 版本較舊。

用 pod --version 檢查它,可能這對你有幫助。

pod deintegrate
pod install
pod update

我做了一切重新啟動Xcode,重建項目,添加工具鏈,鎖定解鎖它們,但對我來說沒有任何作用,所以首先有兩種可能性,也許你安裝了Xcode的測試版

或者試試這個,這對我有用->

我嘗試在 Xcode12/Swift4 中運行一個項目,而該項目是在 Xcode8/Swift3 上編寫的,因此我安裝了 Xcode 11.7 版並為我運行了這項工作。

如果你沒有完成 11.7 然后安裝另一個版本的 Xcode 並嘗試贊賞的版本這可能會幫助你

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 錯誤:命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 Swift編譯器錯誤:命令/Applications/Xcode9.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為6 錯誤 - 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 Xcode 8.0 命令 /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失敗,退出代碼為 1 Xcode 6.0.1命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 Xcode 7失敗,命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 XCode - 命令 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失敗,退出代碼 1 生成失敗並顯示錯誤命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc Bridging-header.h導致命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang失敗,退出代碼為1
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM