安装 Xcode 3.2.4,得到“Base SDK Missing”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3677487/
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
Install Xcode 3.2.4, get "Base SDK Missing"
提问by Clay Bridges
回答by Clay Bridges
The Problem
问题
iOS SDK 4.0 is gone in this release, replaced by iOS SDK 4.1. Details in "The Explanation" below. (NB: this repeats some information in my previous Q/Aregarding 3.2.3).
iOS SDK 4.0 在此版本中消失,取而代之的是 iOS SDK 4.1。详情见下文“说明”。(注意:这重复了我之前关于 3.2.3 的问答中的一些信息)。
The Fix
修复
To fix this specific problem, you need to reset the Base SDK for your target(s), etc. You can either do that for the entire project (most folks), or for each target and/or configuration which applies. Rarely, you might need to do both.
要解决此特定问题,您需要为您的目标等重置 Base SDK。您可以为整个项目(大多数人)或每个适用的目标和/或配置执行此操作。在极少数情况下,您可能需要同时执行这两项操作。
Edit Project Settings
编辑项目设置
- Load your project
- From the menu, select Project > Edit Project Settings...
- Click the "Build" tab.
- Under "Configurations" select "All Configurations".
- Go to the Change Base SDKsection below.
- 加载你的项目
- 从菜单中,选择项目 > 编辑项目设置...
- 单击“构建”选项卡。
- 在“配置”下选择“所有配置”。
- 转到下面的更改基础 SDK部分。
Edit Specific Target/Configuration Settings
编辑特定目标/配置设置
- Load your project
- From the menu, select Project > Active Target > "YourTarget"
- From the menu, select Project > Edit Active Target "YourTarget"
- Click the "Build" tab.
- Under "Configurations" select "All Configurations", or the Configuration you want.
- Go to the Change Base SDKsection below.
- 加载你的项目
- 从菜单中,选择项目 > 活动目标 > “YourTarget”
- 从菜单中,选择项目 > 编辑活动目标“YourTarget”
- 单击“构建”选项卡。
- 在“配置”下选择“所有配置”或您想要的配置。
- 转到下面的更改基础 SDK部分。
Change Base SDK
更改基础 SDK
- Under Architecture > Base SDK, choose one of the available device options: iOS Device 3.2 or iOS Device 4.1. If you are iPhone-only, 4.1 is the way to go.
- If you want to target previous iOS versions, then in that same window, under Deployment > iPhone OS Deployment Target, select the lowest version you want to support. Note that support for 2.x versions through the app store is deprecated.
- 在架构 > 基础 SDK 下,选择可用设备选项之一:iOS 设备 3.2 或 iOS 设备 4.1。如果您只使用 iPhone,那么 4.1 是最佳选择。
- 如果您想针对以前的 iOS 版本,则在同一窗口中,在“部署”>“iPhone OS 部署目标”下,选择您要支持的最低版本。请注意,不推荐通过应用商店支持 2.x 版本。
The Explanation
说明
iOS SDK 4.0 is gone in this release, replaced by iOS SDK 4.1. This is very similar with what happened with the 3.2.3 upgrade, which I covered in detail here. You can still use 3.2.4 to target iOS versions down to 3.0, but AFAIK, you must compile against the 4.1 SDK with Xcode 3.2.4. If this statement confuses you, study the following sentence closely:
iOS SDK 4.0 在此版本中消失,取而代之的是 iOS SDK 4.1。这与 3.2.3 升级发生的情况非常相似,我在此处详细介绍。您仍然可以使用 3.2.4 将 iOS 版本定位到 3.0,但是AFAIK,您必须使用 Xcode 3.2.4 针对 4.1 SDK 进行编译。如果这个陈述让你感到困惑,请仔细研究以下句子:
The iOS SDK you compile against -- the "Base SDK" -- does not downward limit what iOS versions you can support.
您编译的 iOS SDK——“基础 SDK”——不会向下限制您可以支持的 iOS 版本。
In fact, there are two different settings, cf. Change Base SDKabove. If you remain confused, take heart, and read my detailed poston the previous switchover, which is itself chockablock with links to good stuff.
事实上,有两种不同的设置,参见。更改上面的基础 SDK。如果您仍然感到困惑,请振作起来,阅读我关于上一次切换的详细帖子,它本身就是带有指向好东西的链接的 chockablock。
回答by Jerry Cheung
I ran into the same problems for 3.2.5 and followed the same instructions. It didn't work for me, but I noticed that new projects would work properly. When I grepped ShareKit.xcodeproj/project.pbxproj, I noticed that there were still stray references to iphoneos4.0 in the file for SDKROOT param even after changing it in xcode. Manually editing this file and changing all references of SDKROOT to iphoneos fixed the problem. Hope that helps someone.
我在 3.2.5 中遇到了同样的问题并遵循了相同的说明。它对我不起作用,但我注意到新项目可以正常工作。当我搜索 ShareKit.xcodeproj/project.pbxproj 时,我注意到即使在 xcode 中更改了 SDKROOT 参数的文件中仍然存在对 iphoneos4.0 的杂散引用。手动编辑此文件并将 SDKROOT 的所有引用更改为 iphoneos 解决了该问题。希望能帮助某人。
回答by David DelMonte
For all older projects, select the main window, select Option-Cmd-E, choose build and "latest ios...".
对于所有较旧的项目,选择主窗口,选择 Option-Cmd-E,选择 build 和“latest ios...”。
Close the build window.
关闭构建窗口。
In the main window, option-click the dropdown for Base SDK and you should see the latest build available.
在主窗口中,选择并单击 Base SDK 的下拉菜单,您应该会看到可用的最新版本。
It's still a pita, but it's easier than navigating, closing windows, etc....
它仍然是一个皮塔饼,但它比导航、关闭窗口等更容易......
If anyone knows a better method, I'd be happy to hear it...
如果有人知道更好的方法,我会很高兴听到...