运行Xcode程序时出错

时间:2014-01-09 08:39:24

标签: ios iphone xcode xcode5

当我编译现有代码时,它工作正常,但是当我创建新代码并编译时,它显示以下错误:

'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h' has been modified since the precompiled header '/Users/arun/Library/Developer/Xcode/DerivedData/ModuleCache/3OQQ9G3BB8KEO/Foundation.pcm'

请帮我修复此错误。

6 个答案:

答案 0 :(得分:4)

转到~/Library/Developer/Xcode/DerivedData/并删除所有子文件夹,然后删除构建项目

答案 1 :(得分:2)

只需从项目菜单中选择清洁即可。这应该会强制完成重建并解决您的问题。

enter image description here

答案 2 :(得分:2)

如果您错误地更改了NSString.h文件,则无需重新安装Xcode。只需要从当前使用的另一个相同的xcode版本中复制和替换NSString.h文件并清理项目并运行它完全正常运行的应用程序。

答案 3 :(得分:0)

我的项目也面临同样的问题。出现此问题因为您已访问NSString.h(跳转到定义或控制+单击NSString属性)并修改了该文件中的内容。只需再次访问NSString.h并undo您所做的事情。

注意:尝试关闭并重新打开您的项目。似乎很有趣,但有时会工作。

答案 4 :(得分:0)

我也面临同样的问题。我只是清理项目并重建并且工作正常。希望它也适合你。

答案 5 :(得分:0)

您需要替换NSString.h file from another Xcode on path : / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator7.0.sdk / System / Library / Frameworks / Foundation。框架/接头/ NSString.h`

这对我有用!我希望它可以帮助你。