升级到 Xcode 3.2.5 后“缺少基础 SDK”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4340905/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:57:50  来源:igfitidea点击:

"Base SDK Missing" after upgrading to Xcode 3.2.5

iosiphonexcodeios4

提问by ingh.am

So I took the step upgrading to Xcode 3.2.5 (iPhone SDK 4.2) and now I cannot run to device. I always see this now in the dev environment:

所以我采取了升级到 Xcode 3.2.5 (iPhone SDK 4.2) 的步骤,现在我无法运行到设备。我现在总是在开发环境中看到这一点:

alt text

替代文字

In my current projects, when going to the project settings I can only set the Base SDK to iOS 4.2 but this doesn't change the "Base SDK Missing" problem. :/

在我当前的项目中,当进入项目设置时,我只能将 Base SDK 设置为 iOS 4.2,但这不会改变“Base SDK Missing”问题。:/

I can however deploy to the simulator, and change which version I want the simulator to load as.

但是,我可以部署到模拟器,并更改我希望模拟器加载的版本。

Does anyone know how to fix this?

有谁知道如何解决这一问题?

If I create a new project I don't get this...

如果我创建一个新项目,我不会得到这个......

Thanks

谢谢

回答by Richard J. Ross III

I solved this problem, by doing this:

我通过这样做解决了这个问题:

Project->Edit Project Settings->Build->Base SDK->Latest SDK (4.2)
Project->Edit Project Settings->Build->iOS Target Deployment->iOS 4.2

Project->Edit Active Target (myTarget)->Base SDK->Latest SDK (4.2)
Project->Edit Active Target (myTarget)->iOS Target Deployment->iOS 4.2

And, If you still have problems:

而且,如果您仍然有问题:

Click the box that says base SDK missing, and select:

单击显示缺少基本 SDK 的框,然后选择:

Simulator -> Debug

That should do it.

那应该这样做。

回答by Tyson Tune

You can double-click or right-click on your target and pull up it's Info. Click on the build tag and look for the setting for Base SDK. You probably want this set to Latest iOS, which is a new option and should prevent this from happening the next time you upgrade.

您可以双击或右键单击目标并拉出它的信息。单击构建标记并查找 Base SDK 的设置。您可能希望将此设置为最新的 iOS,这是一个新选项,应防止在您下次升级时发生这种情况。

However, you might be better off doing this at the Project level, by selecting Project -> Edit Project Settings and following the steps above. You can also select the general tab under the project settings and set your Base SDK with the "Base SDK for all Configurations" drop down. That has the advantage of fixing a problem that sometimes crops up with your linked frameworks (if they are all in red in the sidebar, you have the problem).

但是,您最好在项目级别执行此操作,方法是选择项目 -> 编辑项目设置并执行上述步骤。您还可以选择项目设置下的常规选项卡,并使用“所有配置的基础 SDK”下拉菜单设置您的基础 SDK。这样做的好处是可以修复链接框架有时会出现的问题(如果它们在侧边栏中全部显示为红色,则说明您有问题)。

回答by hotpaw2

I found that, with Xcode 3.2.5 after setting the Base SDK to Latest iOS in the Project and Target Build info settings, quitting and restarting Xcode automatically got rid of the "Base Missing SDK" message in the select widget.

我发现,使用 Xcode 3.2.5 在项目和目标构建信息设置中将 Base SDK 设置为最新的 iOS 后,退出并重新启动 Xcode 会自动消除选择小部件中的“Base Missing SDK”消息。

回答by Adam Eberbach

Here's what you have to do:

这是你必须做的:

Double click on the main project icon to open properties. Under the General tab, set "Base SDK for all configurations" to "Latest iOS". Under Build tab, set Base SDK to the same thing.

双击主项目图标以打开属性。在常规选项卡下,将“所有配置的基础 SDK”设置为“最新 iOS”。在 Build 选项卡下,将 Base SDK 设置为相同的内容。

Repeat this step for all framework projects under your main project.

对主项目下的所有框架项目重复此步骤。

Finally, and this is the bit I was missing for an annoying week or so, double-click your TARGET (under "Targets") and perform the same steps.

最后,这是我在烦人的一周左右错过的一点,双击您的目标(在“目标”下)并执行相同的步骤。

Things should be back to normal - and since "Latest iOS" should hopefully keep you updated with each new SDK released, you won't have to go through all that again.

事情应该会恢复正常——因为“最新的 iOS”应该会让你在发布的每个新 SDK 中保持更新,你不必再经历这一切。

Finally - restart Xcode or otherwise cause the project file to be reloaded.

最后 - 重新启动 Xcode 或以其他方式导致重新加载项目文件。

Unless you work with people who haven't upgraded yet and persist in submitting changed project files. Apply a similar penalty as you would for breaking a build until they get it. :-)

除非您与尚未升级的人一起工作并坚持提交更改的项目文件。应用与破坏构建类似的惩罚,直到他们得到它。:-)

回答by Rakesh

RESTarting is must folks .. if u won't restart your project (just close the project and then reopen it ) you will see the same thing " base sdk missing"... i also had the same trouble .. but restarting works..

重新启动是必须的人.. 如果你不重启你的项目(只需关闭项目然后重新打开它)你会看到同样的事情“基本 sdk 丢失”......我也遇到了同样的问题......但重新启动工作。 .

回答by David DelMonte

I do not think you need to restart xCode, nor reopen your projects. Try this:

我认为您不需要重新启动 xCode,也不需要重新打开您的项目。尝试这个:

In the main project window, select Option-Cmd-E, choose build and "latest ios...".

在主项目窗口中,选择 Option-Cmd-E,选择 build 和“latest ios...”。

Close the build window.

关闭构建窗口。

In the main project window, option-click the dropdown for Base SDK and you should see the latest build available.

在主项目窗口中,选择并单击 Base SDK 的下拉菜单,您应该会看到可用的最新版本。

Select that and you should be good to go.

选择它,你应该很高兴。

Takes 5 seconds. I hope this helps..

需要 5 秒。我希望这有帮助..

回答by Cesar Mujica

This works fine for me. Just don't forget to restart Xcode.

这对我来说很好用。只是不要忘记重新启动Xcode。