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. arcgis server瓦片行列号计算

    2013-08-01 arcgis server切图时会设置一个原点坐标,如果是经纬度坐标一般默认(x0,y0)=(-400,400)作为切图的起始点,即从这开始算行列号.假设切图的地图某点坐标为x, ...

  2. 升级python(linux)

    查看系统当前python版本 2: [root@wangyuelou ~]# python     Python 2.4.3 (#1, May  5 2011, 16:39:10)     [GCC ...

  3. d3实现的力向导图

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  4. egret3.x升级5.2

    第一步 先用新建项目向导新建一个5.2的项目 第二步 把3.x的代码和资源文件复制过来替换掉 修改资源加载代码 在3.x里 egret采用的是事件机制来加载资源,在5.2里则采用了await/asyn ...

  5. [转]css实现左侧宽度自适应,右侧固定宽度

    原文地址:https://segmentfault.com/a/1190000008411418 页面布局中经常用会遇到左侧宽度自适应,右侧固定宽度,或者左侧宽度固定,右侧自适应.总之就是一边固定宽度 ...

  6. asp.net ashx一般处理程序实现async await异步操作

    目前项目存在页面展示大量图片,效率不高,考虑优化性能,改为ashx+异步下载的方式,废话不说直接贴code: using System; using System.Web; using System. ...

  7. java中的数据加密1 消息摘要

    消息摘要(Message Digest) 又称为数字摘要(Digital Digest).它是一个唯一对应一个消息或文本的固定长度的值,它由一个单向Hash加密函数对消息进行作用而产生.如果消息在途中 ...

  8. git初始化本地项目并推送到git服务器

    1.创建本地项目,在项目根目录执行git init命令 git init 2.在git服务器上创建一个仓库,这里使用GitHub创建一个仓库. 3.执行git remote add origin &l ...

  9. ESN,MEID 和pESN

    ESN (Electronic Serial Numbers):电子序列号.在CDMA 系统中,是鉴别一个物理硬件设备唯一的标识.也就是说每个手机都用这个唯一的ID来鉴别自己, 就跟人的身份证一样.一 ...

  10. [IR] Extraction-based Text Summarization

    文本自动摘要 - 阅读笔记 自动文摘要解决的问题描述很简单,就是用一些精炼的话来概括整篇文章的大意,用户通过阅读文摘就可以了解到原文要表达的意思. 问题包括两种解决思路, 一种是extractive, ...