@IBDesignable 错误:无法更新自动布局状态

@IBDesignable error: Failed to update auto layout status(@IBDesignable 错误:无法更新自动布局状态)

本文介绍了@IBDesignable 错误:无法更新自动布局状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目在情节提要中显示如下错误,我的项目构建成功也在模拟器中成功运行,但是当我打开情节提要时仍然存在错误.

My project is shown me below error in storyboard, my project is build successfully also run successfully in simulator, but still error is exist when i open the storyboard.

错误:

无法为 previewController (80C-7j-jFY) 渲染和更新自动布局状态:dlopen(GoogleMobileAds.framework, 1): 找不到合适的图像.

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

确实找到了:GoogleMobileAds.framework:通用包装器中没有匹配的架构

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

如果有人有任何解决方案来避免它.请给出答复.

If anyone have any solution to avoid it. Please give the response.

推荐答案

对于 Xcode 9.+ 版本您必须降级您的 pod 存储库才能消除此问题.为此你必须做的.

For Xcode 9.+ version You have to downgrade your pod repository to remove this problem. For this what you have to do.

  • 第一步

您必须遵循的步骤

sudo gem list cocoapods

sudo gem uninstall cocoapods

sudo gem install cocoapods -v 1.4.0

  • 第 2 步
  • 转到您的项目目录并像这样更新您的 Pod

    Go to your project Directory and Update Your Pod like

    pod update 
    

    • 第 3 步
    • 清除您的项目以及派生数据.构建并运行您的项目.此错误将在此之后消除.

      Clear your project as well as Derived Data.Build and run your project. This error will remove after this.

      在您的 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 它对我有用.

      Note:- if you are facing this issues on XCODE 10.+ Follow all the steps with sudo gem install cocoapods instead of sudo gem install cocoapods -v 1.4.0 it works for me.

      希望这会对你有所帮助.

      Hope this will help you.

      这篇关于@IBDesignable 错误:无法更新自动布局状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:@IBDesignable 错误:无法更新自动布局状态

基础教程推荐