pods时解决[Xcodeproj] Unknown object version错误

最近在进行在新建工程使用cocoapods时候遇到了这样的错误:

RuntimeError - [Xcodeproj] Unknown object version.

/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file'

/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:903:in `block (2 levels) in inspect_targets_to_integrate'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:902:in `each'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:902:in `block in inspect_targets_to_integrate'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:897:in `inspect_targets_to_integrate'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:69:in `analyze'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:242:in `analyze'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:153:in `resolve_dependencies'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:116:in `install!'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'

/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/bin/pod:55:in `'

/usr/local/bin/pod:23:in `load'

/usr/local/bin/pod:23:in `


   这个错误的原因是Xcode版本与cocopods版本不一致造成的,解决办法很简单,打开工程选择TARGETS,找到右边栏的Project Format,如图:


pods时解决[Xcodeproj] Unknown object version错误_第1张图片

然后将现有的Xcode9.3将其更换为Xcode8.0即可pods成功。

pods时解决[Xcodeproj] Unknown object version错误_第2张图片

小麻烦标记一下,希望能够帮到遇到同样问题的你。

你可能感兴趣的:(pods时解决[Xcodeproj] Unknown object version错误)