加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – Swift不支持SDK’iPhoneSimulator9.3.sdk’?

发布时间:2020-12-15 01:50:53 所属栏目:百科 来源:网络整理
导读:我刚安装了xcode 8.0并将我的项目升级到swift 3.我使用的是swift 2.2和xcode 7.3.1. 但是得到以下错误: Swift does not support the SDK ‘iPhoneSimulator9.3.sdk’ Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
我刚安装了xcode 8.0并将我的项目升级到swift 3.我使用的是swift 2.2和xcode 7.3.1.

但是得到以下错误:

Swift does not support the SDK ‘iPhoneSimulator9.3.sdk’

Command
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
failed with exit code 1

解决方法

当我同时安装了Xcode 7和7.3时,发生了这种情况.在自动更新后,我只剩下8.0.

事情搞砸的一个迹象是在终端输出xcodebuild -sdk -version:

DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7fd810db4c50:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk'>': SDK with name 'watchos3.0' being superceded by SDK with 'watchos3.0'.

解:

>退出Xcode
>转到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
>从该目录中删除iPhoneOS9.3.sdk文件夹.如果仍然需要,请务必制作外部副本,以便稍后再将其复制.
>重新启动Xcode,清理和构建
> ???
>利润

更新:

根据@tsafrir评论,删除模拟器文件夹的’iPhoneOS9.3.sdk’:/Applications/Xcode.app/Contents/Developer/Platforms/iPhon eSimulator.platform /开发商/软件开发工具包

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读