在 Xcode 4、pvw 5 中构建我的应用程序的测试版本时出现“目标 picChoice: iphoneos4.0 中缺少 SDK”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4308793/
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
Getting "Missing SDK in target picChoice: iphoneos4.0" error when building a test release of my app in Xcode 4, pvw 5
提问by Sosullivan
I have opened a functioning Xcode 3x project in Xcode 4.0 pvw 5 and am getting the following error whei I try to build a debug version of the app: "Missing SDK in target picChoice: iphoneos4.0"
我在 Xcode 4.0 pvw 5 中打开了一个正常运行的 Xcode 3x 项目,并且在我尝试构建应用程序的调试版本时出现以下错误:“目标 picChoice 中缺少 SDK:iphoneos4.0”
I am trying to find where and how to remedy this, and I am coming up with bupkus.
我试图找到解决这个问题的地方和方法,我想出了 bupkus。
I apologize if this is not very clear, but I am rather flummoxed by Xcode 4 so far....
如果这不是很清楚,我深表歉意,但到目前为止我对 Xcode 4 感到相当困惑......
回答by Luke
Your problem was probably that Xcode 4 only came with SDK 4.2, and the project pointed to 4.0.
您的问题可能是 Xcode 4 只附带 SDK 4.2,并且项目指向 4.0。
It's pretty common!
这很常见!
The solution is to go to the project info | Build settings | Base SDK and setting it to "Latest iOS" so that you don't have to touch it for future updates.
解决办法是去项目信息| 构建设置 | 基本 SDK 并将其设置为“最新的 iOS”,这样您就不必为将来的更新而触摸它。
When you close the window, you'll have to switch config from debug to release or distribution and back so that it updates and Xcode removes the "Missing SDK" problem.
当您关闭窗口时,您必须将配置从调试切换到发布或分发,然后再切换回来,以便它更新并且 Xcode 消除了“缺少 SDK”的问题。
I just wanted to put the full answer up here to help others who have the same problem ;)
我只是想把完整的答案放在这里,以帮助其他有同样问题的人;)
回答by Sosullivan
Ok...I resolved this, but I did not properly track HOW I resolved it....
好的...我解决了这个问题,但我没有正确跟踪我是如何解决它的....
I think my Target's Base SDK was not set, and I set it to: Latest iOS (iOS 4.2)....
我认为我的 Target 的 Base SDK 没有设置,我将它设置为:最新的 iOS (iOS 4.2)....
I thinkthat's how I did it....
我想我就是这样做的......
But, now it builds with no errors and loads onto my iPhone as expected.
但是,现在它没有错误地构建并按预期加载到我的 iPhone 上。
回答by Nungster
That is exactly what you needed to do. Xcode 4 introduced the Latest iOS. If you wish to test the app for older versions, select target > summary > deployment target and set that to an older iOS version and then in simulator you will see more version options available to you.
这正是您需要做的。Xcode 4 引入了最新的 iOS。如果您希望测试旧版本的应用程序,请选择目标 > 摘要 > 部署目标并将其设置为较旧的 iOS 版本,然后在模拟器中您将看到更多可用的版本选项。