Cocoapods 更新

cocoapods出现了问题

Q1:

The dependency `` is not used in any concrete target
Cocoapods 更新_第1张图片
终端.png

是说没有可用的target

主要是升级之后的cocoapods语法方面出现了变化

之前版本的podfile

platform :iOS, '8.0'
  pod 'AFNetworking', '~> 2.6.0'

这样写就可以了,然后升级之后需要把podfile之中改成以下:

platform :ios, '8.0'
target ‘EasyPark’ do
  pod 'AFNetworking', '~> 2.6.0'
end

嗯,之后顺便升级了下pod,改了下默认源
1.移除现有默认源

gem sources --remove https://rubygems.org/

2.使用新源氏

gem sources -a https://ruby.taobao.org/

3.安装Cocospods

sudo gem install -n /usr/local/bin cocoapods
 pod setup

4.更新gem

sudo gem update --system

Q2:

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

### Command
/Users/majiajun/.rvm/rubies/ruby-2.0.0-p643/bin/pod install
### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack


   CocoaPods : 1.2.1
        Ruby : ruby 2.0.0p643 (2015-02-25 revision 49749) [x86_64-darwin14.3.0]
    RubyGems : 2.4.8
        Host : Mac OS X 10.11.6 (15G1421)
       Xcode : 8.2.1 (8C1002)
         Git : git version 2.10.1 (Apple Git-78)
Ruby lib dir : /Users/majiajun/.rvm/rubies/ruby-2.0.0-p643/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 8a4900df2c767bc9a0a17df13536684ffae251e7


### 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


### Podfile

ruby
platform :ios,??7.0??
target 'EasyPark' do
 pod 'AFNetworking'
end

### Error
ArgumentError - invalid byte sequence in UTF-8
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile.rb:278:in `tr!'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile.rb:278:in `from_ruby'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile.rb:252:in `from_file'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-1.2.1/lib/cocoapods/config.rb:191:in `podfile'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:148:in `verify_podfile_exists!'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-1.2.1/lib/cocoapods/command/install.rb:37:in `run'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:52:in `run'
/Users/majiajun/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-1.2.1/bin/pod:55:in `'
/Users/majiajun/.rvm/rubies/ruby-2.0.0-p643/bin/pod:23:in `load'
/Users/majiajun/.rvm/rubies/ruby-2.0.0-p643/bin/pod:23:in `
' ――― TEMPLATE END ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― [!] Oh no, an error occurred. Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=invalid+byte+sequence+in+UTF-8&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... - ArgumentError - invalid byte sequence in UTF-8 https://github.com/CocoaPods/CocoaPods/issues/4813 [closed] [5 comments] 16 Feb 2017 - Pod install & pod --verbose getting failed https://github.com/CocoaPods/CocoaPods/issues/6297 [open] [3 comments] 29 Dec 2016 - Pod install fails on invalid byte sequence while having LANG=en_US.UTF-8 in profile https://github.com/CocoaPods/CocoaPods/issues/5780 [closed] [5 comments] 24 Oct 2016 and 13 more at: https://github.com/cocoapods/cocoapods/search?q=invalid%20byte%20sequence%20in%20UTF-8&type=Issues&utf8=✓

解决方案:
给老子好好看看podfile的格式!MD,浪费了我好多时间

你可能感兴趣的:(Cocoapods 更新)