今天深寥,新建了一個(gè)項(xiàng)目,使用Cocoapods的pod init命令块仆,報(bào)了如下錯(cuò)誤:
pod init
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
/usr/local/bin/pod init
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
CocoaPods : 1.4.0
Ruby : ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin17]
RubyGems : 2.6.14
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /Users/yuhua/.rvm/rubies/ruby-2.2.5/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ cdddceeb7e89713952368711f41e21460887fe03
### Plugins
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
### Error
RuntimeError - [Xcodeproj] Unknown object version.
/Users/yuhua/.rvm/gems/ruby-2.2.5@global/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/Users/yuhua/.rvm/gems/ruby-2.2.5@global/gems/xcodeproj-1.5.4/lib/xcodeproj/project.rb:102:in `open'
/Users/yuhua/.rvm/gems/ruby-2.2.5@global/gems/cocoapods-1.4.0/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/yuhua/.rvm/gems/ruby-2.2.5@global/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Users/yuhua/.rvm/gems/ruby-2.2.5@global/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:in `run'
/Users/yuhua/.rvm/gems/ruby-2.2.5@global/gems/cocoapods-1.4.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
/Users/yuhua/.rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `eval'
/Users/yuhua/.rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- Pod init. Unknown object version
https://github.com/CocoaPods/CocoaPods/issues/7907 [closed] [2 comments]
a week ago
- RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/7697 [closed] [27 comments]
a day ago
- Unknown object version
https://github.com/CocoaPods/CocoaPods/issues/7760 [closed] [1 comment]
21 May 2018
and 41 more at:
https://github.com/cocoapods/cocoapods/search?q=[Xcodeproj]%20Unknown%20object%20version.&type=Issues&utf8=?
解決辦法
注意其中的錯(cuò)誤提示:
### Error
RuntimeError - [Xcodeproj] Unknown object version.
好了构蹬,知道了,版本的問(wèn)題悔据。只需要用Xcode打開項(xiàng)目庄敛,修改項(xiàng)目Project Format為8.0即可。
好了科汗,愉快的使用吧藻烤。