環(huán)境: macOS10.12
、Xcode 8.1
垢啼、cocoapod1.1.1
窜锯、ruby 2.2.5
電腦抹盤重裝后裝cocoapod后出現(xiàn) [n] xxx abort
問題,且沒生成workspace文件芭析。
? XcodePodTest pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.0)
Generating Pods project
[1] 54680 abort pod update
解決方法:
? sudo gem install cocoapods --pre
? XcodePodTest pod --version
1.2.0.beta.1
更新到1.2.0.beta.1沒有上述問題了锚扎。
如果更新不成功。嘗試重裝下cocoapods
#刪除 cocoapods gems:
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-deintegrate
sudo gem uninstall cocoapods-downloader
sudo gem uninstall cocoapods-plugins
sudo gem uninstall cocoapods-search
sudo gem uninstall cocoapods-stats
sudo gem uninstall cocoapods-try
sudo gem uninstall cocoapods-trunk
? sudo rm -fr ~/Library/Caches/CocoaPods/
? sudo rm -fr ~/.cocoapods/repos/master/
? ~ gem sources -l
*** CURRENT SOURCES ***
http://rubygems-china.oss.aliyuncs.com
? ~ gem sources -l
*** CURRENT SOURCES ***
http://rubygems-china.oss.aliyuncs.com
? ~ gem sources --add https://gems.ruby-china.org/ --remove http://rubygems-china.oss.aliyuncs.com
https://gems.ruby-china.org/ added to sources
http://rubygems-china.oss.aliyuncs.com removed from sources
#安裝最新 pre release版本
sudo gem install cocoapods --pre
? ~ pod setup
Setting up CocoaPods master repo
# pod setup一般會用較長時間馁启。 查看目標目文件夾大小
? ~ cd .cocoapods
? .cocoapods du -sh *
920M repos
再次嘗試pod update
如果你有更好的解決方案驾孔,請告訴我~