what's happening with pod?

感情迁移 提交于 2020-05-15 02:52:33

问题


this is my Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '10.0'
# Pods for BandUJam
target 'BandUJam' do
    pod 'Masonry'
    pod 'SDWebImage'
    pod 'VODUpload'
    pod "AFNetworking",'~> 3.1.0' 
    pod "SDWebImage" 
    pod "UMengUShare/Social/WeChat"
    pod 'AliyunPlayer_iOS'
    pod 'Toast', '~> 4.0.0'
        pod 'UITextView+Placeholder', '~> 1.2'
end

and when I "pod install" or "pod update"

then got this message in terminal

Analyzing dependencies

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

```
/usr/local/bin/pod install
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 1.3.1
        Ruby : ruby 2.4.2p198 (2017-09-14 revision 59899) [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 : /usr/local/Cellar/ruby/2.4.2_1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 90a8f1374ef5378bc8a55c5a4e4a19eb92385907
```

### Plugins

```
cocoapods-deintegrate : 1.0.1
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
```

### Podfile

```ruby
# Uncomment this line to define a global platform for your project
# platform :ios, '10.0'
# Pods for BandUJam
target 'BandUJam' do
    pod 'Masonry'
    pod 'SDWebImage'
    pod 'VODUpload'
    pod "AFNetworking",'~> 3.1.0' 
    pod "SDWebImage" 
    pod "UMengUShare/Social/WeChat"
    pod 'AliyunPlayer_iOS'
    pod 'Toast', '~> 4.0.0'
        pod 'UITextView+Placeholder', '~> 1.2'
end
```

### Error

```
RuntimeError - [Xcodeproj] Unknown object version.
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:903:in `block (2 levels) in inspect_targets_to_integrate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:902:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:902:in `block in inspect_targets_to_integrate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:897:in `inspect_targets_to_integrate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:69:in `analyze'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:242:in `analyze'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:116:in `install!'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23: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] [12 comments]
   a week ago

 - RuntimeError - [Xcodeproj] Unknown object version.
   https://github.com/CocoaPods/CocoaPods/issues/6992 [closed] [12 comments]
   a week ago

 - RuntimeError - [Xcodeproj] Unknown object version.
   https://github.com/CocoaPods/CocoaPods/issues/6991 [closed] [11 comments]
   03 Feb 2018

and 33 more at:
https://github.com/cocoapods/cocoapods/search?q=[Xcodeproj]%20Unknown%20object%20version.&type=Issues&utf8=✓

and I tried this in the terminal

cd ~/.cocoapods/repos
rm -rf master
pod setup

still got this message in terminal

How to fix it? thank you very much!


回答1:


You need to run this Sudo gem install cocoapods --pre Please check this reported issue https://github.com/CocoaPods/CocoaPods/issues/7458




回答2:


Check you xcodeproj gem version by the following:

gem list

If it is under 1.5.6, update it using:

gem update xcodeproj

After update is completed, you can remove the old version using:

gem uninstall xcodeproj

And select the old version.

Hope this will help!




回答3:


If you are using xCode Version 9.4 and create new project you will find this issue, to fix this issue change the project formate to xCode8.0- compatible




回答4:


use these pods above of (# Pods for BandU)and save your file. Then again install and update your pod. it will work.

These are the correct framework use now:

pod 'Masonry'
pod 'SDWebImage'
pod 'Aliyun VideoCore'
pod 'AliyunOSSiOS'
pod 'VODUpload'
pod 'AFNetworking'
pod 'UMengUShare/Social/WeChat'
pod 'Toast'
pod 'UITextView+Placeholder'

Hope it will help you.



来源:https://stackoverflow.com/questions/49952743/whats-happening-with-pod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!