今天想熟悉一下ReactiveCocoa框架.
然后是千篇一律的操作,来新建一个空项目,深思熟虑的起名之后一顿Next,就创建好了.
接下来是略有逼格的命令操作,cd到当前项目目录下,初始化一个pod文件,一个华丽的pod init加回车,尽显逼王风采.
擦??~~~,报错,啥情况??
~/Desktop/RAC pod init
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
/Users/yyy/.rvm/rubies/ruby-2.4.0/bin/pod init
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
CocoaPods : 1.3.1
Ruby : ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
RubyGems : 2.6.12
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.4.1 (9F2000)
Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /Users/yyy/.rvm/rubies/ruby-2.4.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 102d931b69c0bfa1a4b5f9a99f36fb05f5a2c3b3
### Plugins
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.2.0
cocoapods-try : 1.1.0
### Error
RuntimeError - [Xcodeproj] Unknown object version.
/Users/yyy/.rvm/gems/ruby-2.4.0@global/gems/xcodeproj-1.5.1/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/gems/xcodeproj-1.5.1/lib/xcodeproj/project.rb:102:in `open'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-1.3.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/Users/yyy/.rvm/rubies/ruby-2.4.0/bin/pod:23:in `load'
/Users/yyy/.rvm/rubies/ruby-2.4.0/bin/pod:23:in `<main>'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/bin/ruby_executable_hooks:15:in `eval'
/Users/yyy/.rvm/gems/ruby-2.4.0@global/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...
- RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/7458 [closed] [17 comments]
4 weeks ago
- RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/6992 [closed] [15 comments]
6 weeks ago
- Pod Update: RuntimeError - [Xcodeproj] Unknown object version. Xcode Beta 5
https://github.com/CocoaPods/CocoaPods/issues/8003 [closed] [18 comments]
29 Oct 2018
and 43 more at:
https://github.com/cocoapods/cocoapods/search?q=[Xcodeproj]%20Unknown%20object%20version.&type=Issues&utf8=✓
出事了快找搜索引擎,输入pod init Search for existing GitHub issues similar to yours:
然后找到了答案,让我卸载pod 重新安装
sudo gem uninstall cocoapods
输入密码之后发现列出了两个cocoapods版本
Select gem to uninstall:
1. cocoapods-1.2.1
2. cocoapods-1.3.1
3. All versions
果断按3
输出如下(确认按Y):
Successfully uninstalled cocoapods-1.2.1
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.3.1
重新安装cocoapods
sudo gem install cocoapods
一顿疯狂的输出之后是前所未有的畅快
接下来pod init
成功~~~!!
网友评论