iOS cocoapods pod FrozenError and RuntimeError

打印 上一主题 下一主题

主题 831|帖子 831|积分 2493

0x00 报错日志

  1. /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
  2.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface/error_report.rb:34:in `report'
  3.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command.rb:66:in `report_error'
  4.         from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
  5.         from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
  6.         from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
  7.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command.rb:52:in `run'
  8.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/bin/pod:55:in `<top (required)>'
  9.         from /usr/local/bin/pod:23:in `load'
  10.         from /usr/local/bin/pod:23:in `<main>'
  11. /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (60). (RuntimeError)
  12.         from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:113:in `open'
  13.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:1194:in `block (2 levels) in inspect_targets_to_integrate'
  14.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:1193:in `each'
  15.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:1193:in `block in inspect_targets_to_integrate'
  16.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
  17.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:1188:in `inspect_targets_to_integrate'
  18.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:107:in `analyze'
  19.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:422:in `analyze'
  20.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
  21.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
  22.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
  23.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:162:in `install!'
  24.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command/install.rb:52:in `run'
  25.         from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
  26.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command.rb:52:in `run'
  27.         from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/bin/pod:55:in `<top (required)>'
  28.         from /usr/local/bin/pod:23:in `load'
  29.         from /usr/local/bin/pod:23:in `<main>'
复制代码

0x01 处理办法

1、更新 CocoaPods 到与 Xcode 兼容的版本。
下令:sudo gem install cocoapods
2、清算 CocoaPods 缓存
下令:pod cache clean --all
都不行!
凭我多年的经验,我修改了一下这个地方,居然没报错了!


  • 右键 xxx.xcodeproj,显示包内容
  • 打开 project.pbxproj
  • 把 objectVersion 对应的数值,修改得低一点
  • 再尝试 pod install
搞定!完美!


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

汕尾海湾

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表