Module compiled with Swift 版本号 cannot be imported by the Swift 版本号 compiler

Module compiled with Swift 版本号 cannot be imported by the Swift 版本号 compiler,第1张

今天把xcode升级到12.5最新版,然后编译出现下面错误。。。记录下

XCTestWD:Module compiled with Swift 5.3.1 cannot be imported by the Swift 5.4.2 compiler: /Users/liyinchi/TestTool/node-v12.18.3-darwin-x64/lib/node_modules/app-inspector/node_modules/[email protected]@xctestwd/XCTestWD/../Carthage/Build/iOS/Swifter.framework/Modules/Swifter.swiftmodule/arm64-apple-ios.swiftmodule

翻译下大概意思是之前的模块用的swift5.3.1编译的,不能被5.4.2的编译器import导入。

错误原因:

老的swift模块,不能被最新的xcode使用。

解决方法:
到swift官方下载一个工具
https://swift.org/download/#releases
选择 xcode 12.5我当前的版本

 

下载完以后安装swift-5.3.1-RELEASE-osx.pkg

文件很大831.3M,可以右键复制链接,然后用迅雷下载

安装完以后在xcode里面左上角点击xcode菜单打开能找到Toolchains
选择xcode12.5 也就是你下载以后选择最新版本就行,再编译就不会报错了

 

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/993165.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存