Xcode 不会编译到模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12524771/
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
Xcode Won't Compile To Simulator
提问by Flatlyn
I've just updated Xcode 4.5 via the App Store, from my previous version which I got from my Apple Developer Account. Since the update I can't compile any apps into the Simulator. I can compile onto a device, e.g. my iPhone.
我刚刚通过 App Store 更新了 Xcode 4.5,这是我从我的 Apple 开发者帐户获得的以前的版本。自更新以来,我无法将任何应用程序编译到模拟器中。我可以编译到设备上,例如我的 iPhone。
The error I recieve is
我收到的错误是
fatal error: file
'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/
Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include/Availability.h'
has been modified since the precompiled header was built
1 error generated.
回答by CRDave
go in ~/Library/Developer/Xcode/DerivedData/{project name + gobly-gook}
and delete folder with your project name.
进入~/Library/Developer/Xcode/DerivedData/{project name + gobly-gook}
并删除具有您项目名称的文件夹。
EDIT After suggestion
编辑后建议
NOTE:
笔记:
By default Library Folder is hidden so we can't see it.
So we have three way to use this hidden ~/Library folder
默认情况下,库文件夹是隐藏的,所以我们看不到它。
所以我们有三种方法来使用这个隐藏的 ~/Library 文件夹
1.Unhide Library folder by following command to unhide ~/Library folder
1.Unhide Library 文件夹通过以下命令取消隐藏 ~/Library 文件夹
chflags nohidden ~/Library
Now you can see Library folder as /Users//Library
现在您可以看到 Library 文件夹为 /Users//Library
2. Open GO menu of finder and press Alt key and Library will be visible as new menu item.
Select that to open Library folder
2. 打开finder 的GO 菜单并按Alt 键,库将作为新菜单项可见。
选择打开库文件夹
3. You can access ~/Library folder by Terminal.
3. 您可以通过终端访问 ~/Library 文件夹。
回答by Yaroslav Fedorov
There's easiest way: Just "clean" project (Product> Clean)
有最简单的方法:只需“清理”项目(产品>清理)
回答by amfcosta
You can just open the Organizer (top-right corner of XCode), go to the Projects tab, select your project on the left and then delete the Derived Data.
您只需打开管理器(XCode 的右上角),转到“项目”选项卡,在左侧选择您的项目,然后删除派生数据。
回答by thatzprem
This happened when I updated Xcode from 6.0.1 to 6.1
这发生在我将 Xcode 从 6.0.1 更新到 6.1 时
I cleaned the project and could compile successfully!!
我清理了项目并且可以成功编译!!