无法在情节提要中呈现和更新自动布局。 Xcode 9.4

Failed to render and update auto layout in storyboard. Xcode 9.4

我正在使用 Xcode 9.4 和 MaterialComponents。项目构建并正常运行,但故事板抛出以下错误:

Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(MaterialComponents.framework, 1): Library not loaded: @rpath/MDFInternationalization.framework/MDFInternationalization
  Referenced from: MaterialComponents.framework
  Reason: image not found

当我将 MaterialComponents 中的任何元素添加到故事板时,它会停止在设计器中显示任何内容。

是Cocoapod 1.5.0版本的问题 如果您正在使用它,您将收到此错误。

要删除当前版本,您只需 运行:

sudo gem卸载cocoapods

您可以通过以下命令安装特定版本的 cocoa pods:

sudo gem 安装 cocoapods -v 1.4.0