2014-09-18 157 views
4

我剛將我的Xcode升級到6.0.1,我無法再編譯。 Xcode的構建與下面的錯誤而失敗:Xcode 6..0.1無法編譯故事板

nwi_state: registration failed (1000000) 
2014-09-18 12:46:28.977 Interface Builder Cocoa Touch Tool[19152:359412] The view hierarchy is not prepared for the constraint: <NSLayoutConstraint:0x7fb2cb5b5800 UIImageView:0x7fb2cb5893e0.centerY == UITableViewLabel:0x7fb2cb5a8950.centerY> 
    When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug. 
2014-09-18 12:46:28.978 Interface Builder Cocoa Touch Tool[19152:359412] *** Assertion failure in -[UITableViewCellContentView _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:], /SourceCache/UIKit_Sim/UIKit-3318/NSLayoutConstraint_UIKitAdditions.m:558 
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255 

回答

0

在此基礎上記在日誌中:

當添加到一個視圖,約束的物品必須是視圖(或視圖本身)的後裔。如果在組裝視圖層次結構之前需要解析約束,這將會崩潰。打破 - [UIView _viewHierarchyUnpreparedForConstraint:]進行調試。

添加一個象徵性的斷點: - [UIView的_viewHierarchyUnpreparedForConstraint:]

你也可能只是想清除涉及該視圖的約束。