Module compiled with Swift 5.4 cannot be imported by the Swift 5.5.3 compiler: /Users/mac/Library/Developer/Xcode/DerivedData/KXDoctor-czsykaekbrfzuwcrjnbobnvyczov/Build/Products/Debug-iphoneos/SnapKit.swiftmodule/arm64.swiftmodule 錯誤解決:
1. 更新到最新版Xcode
2. 刪除Xcode菜單-Toolchains下的所有swift 5.x release
3. 刪除 ~/Library/Developer/Xcode/DerivedData/下的所有文件夾(重要!!?。?/h5>
重啟Xcode運行即編譯成功
前期嘗試:
ToolChain管理:下載 https://www.swift.org/download/#releases 提供的Toolchains,下載了兩個版本(復制鏈接,使用迅雷下載能快點...) 貌似都沒用~
pod install之后也沒用~
更改默認Xcode路徑:
sudo xcode-select -s /Applications/Xcode.app
查看默認Xcode:
xcodebuild -version