CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target

前几天电脑重装了系统,CocoaPods报错!

[!] The dependency `SDWebImage` is not used in any concrete target.

The dependency `Reachability` is not used in any concrete target.

The dependency `JSONModel` is not used in any concrete target.

The dependency `MBProgressHUD` is not used in any concrete target.

The dependency `Masonry` is not used in any concrete target.

The dependency `HexColors` is not used in any concrete target.

The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.

The dependency `SVProgressHUD` is not used in any concrete target.

The dependency `FastAnimationWithPOP` is not used in any concrete target.

The dependency `CocoaSecurity` is not used in any concrete target.

The dependency `Toast` is not used in any concrete target.

The dependency `JSPatch (~> 1.0)` is not used in any concrete target.

The dependency `WebViewJavascriptBridge (~> 4.1.4)` is not used in any concrete target.

The dependency `NJKWebViewProgress` is not used in any concrete target.

The dependency `MJRefresh` is not used in any concrete target.

The dependency `MJExtension` is not used in any concrete target.

The dependency `UMengAnalyticsSDK` is not used in any concrete target.

The dependency `UMengFeedbackSDK` is not used in any concrete target.

The dependency `Bugtags` is not used in any concrete target.

The dependency `YYKit` is not used in any concrete target.

The dependency `CocoaLumberjack` is not used in any concrete target.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:164:in `validate_podfile!'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:62:in `analyze'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:227:in `analyze'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:151:in `block in resolve_dependencies'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:150:in `resolve_dependencies'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:114:in `install!'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/update.rb:60:in `run'

/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `'

/usr/local/bin/pod:23:in `load'

/usr/local/bin/pod:23:in `

'

  • 1
  • 2
  • 1
  • 2
  • 提示,大概就是我的版本不是 last version,就是下面这个:
sudo gem install cocoapods --pre
  • 1
  • 1

安装cocoapods的预览版本,就会更新下来新的1.0.1版本,如下所示:

Successfully installed cocoapods-1.0.1

Parsing documentation for cocoapods-1.0.1

  • 1
  • 2
  • 1
  • 2

更新了新的版本,出错如下:

Updating local specs repositories
Analyzing dependencies

[!] The dependency `SDWebImage` is not used in any concrete target.

The dependency `Reachability` is not used in any concrete target.

The dependency `JSONModel` is not used in any concrete target.

The dependency `MBProgressHUD` is not used in any concrete target.

The dependency `Masonry` is not used in any concrete target.

The dependency `HexColors` is not used in any concrete target.

The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.

The dependency `SVProgressHUD` is not used in any concrete target.

The dependency `FastAnimationWithPOP` is not used in any concrete target.

The dependency `CocoaSecurity` is not used in any concrete target.

The dependency `Toast` is not used in any concrete target.

The dependency `JSPatch (~> 1.0)` is not used in any concrete target.

The dependency `WebViewJavascriptBridge (~> 4.1.4)` is not used in any concrete target.

The dependency `NJKWebViewProgress` is not used in any concrete target.

The dependency `MJRefresh` is not used in any concrete target.

The dependency `MJExtension` is not used in any concrete target.

The dependency `UMengAnalyticsSDK` is not used in any concrete target.

The dependency `UMengFeedbackSDK` is not used in any concrete target.

The dependency `Bugtags` is not used in any concrete target.

The dependency `YYKit` is not used in any concrete target.

The dependency `CocoaLumberjack` is not used in any concrete target.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

官网是这样给推荐的: 
在创建Podfile的时候,用这种格式使用,

platform :ios, '8.0'
#use_frameworks!个别需要用到它,比如reactiveCocoa

target 'MyApp' do
  pod 'AFNetworking', '~> 2.6'
  pod 'ORStackView', '~> 3.0'
  pod 'SwiftyJSON', '~> 2.3'
end
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 里面的 MyApp 记得替换为自己攻城里面的target。这样就基本OK了,执行pod install / pod update 就都可以了。(use_frameworks! 这个是个别需要的,这里修改一下,可以把我上面的代码中的这一行【删除】

下面是另外一种写法,

platform :ios, '8.0'
#use_frameworks!个别需要用到它,比如reactiveCocoa

def pods
  pod 'AFNetworking', '~> 2.6'
  pod 'ORStackView', '~> 3.0'
  pod 'SwiftyJSON', '~> 2.3'
end
target 'MyApp' do
  pods
end

你可能感兴趣的:(CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target)