ios - @IBDesignable 错误 : Failed to update auto layout status

标签 ios admob

我的项目在 Storyboard 中显示了以下错误。我的项目构建成功,在模拟器中也运行成功,但是当我打开 Storyboard时仍然存在错误。

错误:

Failed to render and update auto layout status for previewController (80C-7j-jFY): dlopen(GoogleMobileAds.framework, 1): no suitable image found.

Did find: GoogleMobileAds.framework: no matching architecture in universal wrapper

如何避免?

Enter image description here

最佳答案

对于 Xcode 版本 9 及更高版本,您必须降级您的 pod 存储库才能消除此问题。

为此你必须做的:

第一步

您必须遵循的步骤:

sudo gem list cocoapods

sudo gem uninstall cocoapods

sudo gem install cocoapods -v 1.4.0

第三步

转到您的项目目录并更新您的 pod

pod update

第三步

清除您的项目以及派生数据。构建并运行您的项目。此错误将在此之后被删除。

将此脚本添加到您的 POD 文件中:

post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end

注意:如果您在 Xcode 10 及更高版本上遇到此问题,请使用 sudo gem install cocoapods 而不是 sudo gem install cocoapods -v 1.4.0。它对我有用。

关于ios - @IBDesignable 错误 : Failed to update auto layout status,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50644306/

相关文章:

ios - 在代码中调整布局后 UICollectionViewCell 更新约束

java - 插页式广告未加载?

ios - 在其他场景中显示插页式广告 - Admob、SpriteKit、Swift

android - AdLoader 始终加载内容广告

ios - 如何让多个用户同时更新我的​​一个 CloudKit 记录而不重叠?

iphone - 在 map View 上方添加固定按钮

objective-c - iPad+将图像选择器质量设置为低

iOS admob永不刷新广告

android - AdMob: "activity has leaked ServiceConnection"和 "AdvertisingIdClient unbindService failed."

ios - 在iOS 11中,如何使核心数据在核心聚光灯下可搜索