xcode 不支持的 swift 版本 (SWIFT 5)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/55452274/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unsupported swift version (SWIFT 5)
提问by MhmdRizk
before you mark this question as a duplicate, I checked this question
在您将此问题标记为重复之前,我检查了此问题
and it didn't work for me.
它对我不起作用。
how to fix this error:
如何修复此错误:
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'DropDown')
回答by Deepak Chaudhary
回答by Rakesha Shastri
You have code which was compiled on the new Xcode 10.2 or the beta version which supports Swift 5. Update your Xcode to the latest version.
您的代码是在新的 Xcode 10.2 或支持 Swift 5 的测试版上编译的。将您的 Xcode 更新到最新版本。
回答by Dan Korkelia
After upgrading to Xcode 10.2 release make sure you reboot MacOS. I had the exact same problem and reboot helped.
升级到 Xcode 10.2 版本后,请确保重新启动 MacOS。我遇到了完全相同的问题,重新启动有帮助。