Module compiled with Swift 5.4 cannot be imported by the Swift 5.5.3

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/下的所有文件夹(重要!!!)

重启Xcode运行即编译成功

前期尝试:
ToolChain管理:下载 https://www.swift.org/download/#releases 提供的Toolchains,下载了两个版本(复制链接,使用迅雷下载能快点...) 貌似都没用~
pod install之后也没用~

更改默认Xcode路径:
sudo xcode-select -s /Applications/Xcode.app
查看默认Xcode:
xcodebuild -version

你可能感兴趣的:(Module compiled with Swift 5.4 cannot be imported by the Swift 5.5.3)