2014-06-11 28 views
0

使用Xcode6-Beta時,我無法編譯代碼以在我的iOS7.1設備上運行。我得到的錯誤是這樣的:Xcode6'Foundation/Foundation.h'文件未找到

While building module 'UIKit' imported from /Users/johnboiles/Programming/iOS/Playground-ios/Playground-ios/AppDelegate.h:9: fatal error: 'Foundation/Foundation.h' file not found 
#import <Foundation/Foundation.h> 
     ^
In file included from /Users/johnboiles/Programming/iOS/Playground-ios/Playground-ios/AppDelegate.m:9: 
/Users/johnboiles/Programming/iOS/Playground-ios/Playground-ios/AppDelegate.h:9:9: fatal error: could not build module 'UIKit' 
#import <UIKit/UIKit.h> 
~~~~~~~^ 

有趣Foundation.framework其實不是在/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks就像是在Xcode以前的版本。我沒有(至少在知識上)修改了SDK中的任何內容。

回答

1

刪除並重新安裝Xcode6-Beta修復了該問題。

如果有人對Foundation.framework發生的事情有任何瞭解,我很樂意聽到它。

+1

有時Xcode可能會有點特別的測試版本。我有一些AV類無緣無故地消失。 –

+0

瘋了。很難想象那裏發生了什麼 – johnboiles

+1

不知道它是否有關 - 但是當我運行這個谷歌腳本後,所有這一切都錯了google-api-objectivec-client-master/Examples/CalendarSample/buildStripHeaders – johndpope

0

我做了以下步驟,一切都恢復正常。

  1. 重新安裝當前的Xcode
  2. 在Xcode的首次發射,Shift + Command + K清理以前的版本
  3. 等待,直到索引完成。
  4. 重新構建。