wjw:layoutInScrollView username$ pod install
Analyzing dependencies
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ### Command ```
/Users/username/.rvm/rubies/ruby-2.4./bin/pod install
``` ### Report * What did you do? * What did you expect to happen? * What happened instead? ### Stack ```
CocoaPods : 1.3.
Ruby : ruby 2.4.1p111 (-- revision ) [x86_64-darwin16]
RubyGems : 2.6.
Host : Mac OS X 10.13. (17E199)
Xcode : ()
Git : git version 2.15. (Apple Git-)
Ruby lib dir : /Users/username/.rvm/rubies/ruby-2.4./lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ bae6174a62acba399199f905e56b38f82581dd0e
``` ### Plugins ```
cocoapods-deintegrate : 1.0.
cocoapods-plugins : 1.0.
cocoapods-search : 1.0.
cocoapods-stats : 1.0.
cocoapods-trunk : 1.3.
cocoapods-try : 1.1.
``` ### Podfile ```ruby
platform :ios, '8.0' target:'layoutInScrollView' do pod "AFNetworking", '~> 3.1.0'
pod "Masonry", '~>1.1.0'
pod 'MBProgressHUD', '1.1.0' end
``` ### Error ```
RuntimeError - [Xcodeproj] Unknown object version.
/Users/username/.rvm/gems/ruby-2.4.@global/gems/xcodeproj-1.5./lib/xcodeproj/project.rb::in `initialize_from_file'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/xcodeproj-1.5./lib/xcodeproj/project.rb::in `open'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer/analyzer.rb::in `block ( levels) in inspect_targets_to_integrate'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer/analyzer.rb::in `each'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer/analyzer.rb::in `block in inspect_targets_to_integrate'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/user_interface.rb::in `section'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer/analyzer.rb::in `inspect_targets_to_integrate'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer/analyzer.rb::in `analyze'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer.rb::in `analyze'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer.rb::in `block in resolve_dependencies'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/user_interface.rb::in `section'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer.rb::in `resolve_dependencies'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/installer.rb::in `install!'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/command/install.rb::in `run'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/claide-1.0./lib/claide/command.rb::in `run'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./lib/cocoapods/command.rb::in `run'
/Users/username/.rvm/gems/ruby-2.4.@global/gems/cocoapods-1.3./bin/pod::in `<top (required)>'
/Users/username/.rvm/rubies/ruby-2.4./bin/pod::in `load'
/Users/username/.rvm/rubies/ruby-2.4./bin/pod::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]
weeks ago - RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/7697 [closed] [27 comments]
days ago - Unknown object version
https://github.com/CocoaPods/CocoaPods/issues/7760 [closed] [1 comment]
May and more at:
https://github.com/cocoapods/cocoapods/search?q=[Xcodeproj]%20Unknown%20object%20version.&type=Issues&utf8=✓
wjw:layoutInScrollView username$ ruby --v
ruby: invalid option --v (-h will show valid options) (RuntimeError)
wjw:layoutInScrollView username$ ruby -v
ruby 2.4.1p111 (-- revision ) [x86_64-darwin16]

引发这个问题的原因可能是我再工程中用cocopods导入了本地的SDK,中间有用到从本地添加sdk。

然后再新建其他项目时,再用cocopods 的 install命令就报了这个错。网上的答案很多。我试了很有效:

在终端执行命令:

gem install cocoapods --pre
wjw:layoutInScrollView username$ gem install cocoapods --pre
Fetching: cocoapods-core-1.5..gem (%)
Successfully installed cocoapods-core-1.5.
Fetching: cocoapods-deintegrate-1.0..gem (%)
Successfully installed cocoapods-deintegrate-1.0.
Fetching: cocoapods-downloader-1.2..gem (%)
Successfully installed cocoapods-downloader-1.2.
Fetching: molinillo-0.6..gem (%)
Successfully installed molinillo-0.6.
Fetching: atomos-0.1..gem (%)
Successfully installed atomos-0.1.
Fetching: nanaimo-0.2..gem (%)
Successfully installed nanaimo-0.2.
Fetching: xcodeproj-1.5..gem (%)
Successfully installed xcodeproj-1.5.
Fetching: cocoapods-1.5..gem (%)
Successfully installed cocoapods-1.5.
Parsing documentation for cocoapods-core-1.5.
Installing ri documentation for cocoapods-core-1.5.
Parsing documentation for cocoapods-deintegrate-1.0.
Installing ri documentation for cocoapods-deintegrate-1.0.
Parsing documentation for cocoapods-downloader-1.2.
Installing ri documentation for cocoapods-downloader-1.2.
Parsing documentation for molinillo-0.6.
Installing ri documentation for molinillo-0.6.
Parsing documentation for atomos-0.1.
Installing ri documentation for atomos-0.1.
Parsing documentation for nanaimo-0.2.
Installing ri documentation for nanaimo-0.2.
Parsing documentation for xcodeproj-1.5.
Installing ri documentation for xcodeproj-1.5.
Parsing documentation for cocoapods-1.5.
Installing ri documentation for cocoapods-1.5.
Done installing documentation for cocoapods-core, cocoapods-deintegrate, cocoapods-downloader, molinillo, atomos, nanaimo, xcodeproj, cocoapods after seconds
gems installed

执行 pod install

Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.)
Installing MBProgressHUD (1.1.)
Installing Masonry (1.1.)
Generating Pods project
Integrating client project [!] Please close any current Xcode sessions and use `layoutInScrollView.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are dependencies from the Podfile and total pods installed.

RuntimeError - [Xcodeproj] Unknown object version.解决方法的更多相关文章

  1. 解决[Xcodeproj] Unknown object version错误

    错误描述: RuntimeError - [Xcodeproj] Unknown object version. /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.2 ...

  2. mac 上运行cassandra出现的java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: : : unknown error错误解决方法

    mac 上运行cassandra出现的java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostExce ...

  3. Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法

    发现问题 运行一下以前的一个Vue+webpack的 vue仿新闻网站  小项目,报错 由于自己vue学习不深入,老是这个报错,找了好久(确切的说是整整一下午^...^)才找到原因 -v- Uncau ...

  4. Ubuntu 14.4 Django模型迁移到数据库提示 LookupError: unknown encoding: utf8mb4 解决方法

    由于数据库中需要存储emoji表情,因此需要mysql支持utf8mb4,参考前面的文章升级数据库. 但是由于服务器上面的python-mysqldb连接包版本为1.2.3不支持utf8mb4,因此报 ...

  5. elipse手机设备显示Target unknown或者offline解决方法

    参考资料: http://blog.csdn.net/yuanjingjiang/article/details/11297433 http://www.educity.cn/wenda/153487 ...

  6. identity server4 授权成功页面跳转时遇到错误:Exception: Correlation failed. Unknown location的解决方法

    一.异常信息描述 错误信息,看到这个页面是否耳熟能详担又不知道怎么解决 ,坑死个人不偿命,,,,,,,, 二.处理方法 1.在web项目中增加类SameSiteCookiesServiceCollec ...

  7. unsupported major.minor version 解决方法

        转载自http://hi.baidu.com/fatchong/blog/item/191da23b478bbfef15cecbae.html         一直以来都是用jdk1.5,这次 ...

  8. 错误“Object reference not set to an instance of an object”的解决方法

    在进行unity游戏制作的C#代码编写时,会遇到“NullReferenceException: Object reference not set to an instance of an objec ...

  9. gluster peer probe: failed: Probe returned with unknown errno 107解决方法

    当在glusterfs中将服务器加到存储池中,及运行”gluster peer probe server”命令, 遇到peer probe: failed: Probe returned with u ...

随机推荐

  1. SourceInsight: sourceInsight4.0 修改默认字体

    快捷键 Alt + Y

  2. 解决python-memcache报错:“Unknown flags on get: 20”

    [本文出自天外归云的博客园] 在使用python的pytho-memcache库时出现了一个问题,在调用get方法获取键值的时候报错:Unknown flags on get: 20 在网上查了,发现 ...

  3. django 返回 code 405

    return HttpResponse('Invalid Method',status=405)

  4. 【iCore4 双核心板_ARM】例程七:WWDG看门狗实验——复位ARM

    实验原理: STM32内部包含窗口看门狗,通过看门狗可以监控程序运行,程序运行错误时,未在 规定时间喂狗(提前或超时),自动复位ARM,本实验通过按键按下,停止喂狗,从而产 生复位. 核心代码: in ...

  5. STM32 多通道ADC采样,采用Timer1进行采样率控制,利用DMA进行传输

    http://blog.csdn.net/varding/article/details/17559399 http://www.51hei.com/stm32/3842.html https://w ...

  6. 【Git】简单使用

    [Git & Github] 首先不能混淆两者的概念.git是一个类似于svn的版本管理工具.其可以在本地建立起针对一个项目的众多维度的版本管理体系,提升了开发的效率. 相对的,我们如果想要和 ...

  7. yizhihongqiang

    最新网址:https://www.     hongxingwangzhi           .com/

  8. Android四大组件之——Activity(一)定义、状态和后退栈(图文详解)

    什么是Activity 关键字:应用组件.四大组件.用户界面,交互. An Activity is an application component that provides a screen wi ...

  9. python加快数据处理的方法

    1.一切数据库操作最好使用内网连接, 2.使用批量操作接口操作数据库,而不是多线程频繁操作单条数据 3.如果python进程的cpu使用率达到100%了,需要开启多进程.java单个进程cpu使用率在 ...

  10. [UFLDL] Basic Concept

    博客内容取材于:http://www.cnblogs.com/tornadomeet/archive/2012/06/24/2560261.html 参考资料: UFLDL wiki UFLDL St ...