內(nèi)容提要:
podfile升級(jí)之后到最新版本你雌,pod里的內(nèi)容必須明確指出所用第三方庫的target疾嗅,否則會(huì)出現(xiàn)The dependency `` is not used in any concrete target這樣的錯(cuò)誤。
以下從三個(gè)步驟陳述:
1. Podfile升級(jí)
查看pod版本:
pod --version
pod 升級(jí)(此時(shí)是升級(jí)到1.0.0.beta.2版本):
sudo gem install cocoapods --pre
2. 錯(cuò)誤內(nèi)容:
我的Podfile的內(nèi)容是:
platform :ios, '7.0'
pod 'ReactiveCocoa', '2.1.8'
pod 'objectiveflickr', '2.0.4'
pod 'LinqToObjectiveC', '2.0.0'
pod 'SDWebImage', '3.6'
pod install后出現(xiàn)錯(cuò)誤The dependency `` is not used in any concrete target
復(fù)制代碼
pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /Applications/Cocos/tools/ant/bin in PATH, mode 040777
Re-creating CocoaPods due to major version update.
Updating local specs repositories
Analyzing dependencies
[!] The dependency `ReactiveCocoa (= 2.1.8)` is not used in any concrete target.
The dependency `objectiveflickr (= 2.0.4)` is not used in any concrete target.
The dependency `LinqToObjectiveC (= 2.0.0)` is not used in any concrete target.
The dependency `SDWebImage (= 3.6)` is not used in any concrete target.
復(fù)制代碼
3. 修改方法:
Podfile內(nèi)容更改:
復(fù)制代碼
platform :ios, '7.0'
target "RWTFlickrSearch" do
pod 'ReactiveCocoa', '2.1.8'
pod 'objectiveflickr', '2.0.4'
pod 'LinqToObjectiveC', '2.0.0'
pod 'SDWebImage', '3.6'
end
復(fù)制代碼
這樣再運(yùn)行pod install,就會(huì)成功了。