The file “Pods.xcconfig” couldn’t be opened because there is no such file.

從github上下載的項目,運行後報錯

/Users/wyapple/Downloads/kanaishinichi-TAXHeaderSheet-8b83e84/TAXHeaderSheetDemo.xcodeproj The file “Pods.xcconfig” couldn’t be opened because there is no such file. (/Users/wyapple/Downloads/kanaishinichi-TAXHeaderSheet-8b83e84/Pods/Pods.xcconfig)


1、如果你安裝過CocoaPods(沒安裝過的話往下翻看第二點),只需要

cd 到項目工程所在的文件夾下

如cd /Users/wyapple/Downloads/kanaishinichi/

再執行pod update

然後直接運行項目所屬的目錄下的新生成的.xcworkspace後綴的文件,運行的時候打開這個文件即可。


2、下面是我摸索解決的過程,如果你也遇到同樣的問題可以參考下

於是百度了一下:運行了git submodule update -i --recursive後報錯:Error loading RubyGems plugin "/Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/rubygems-bundler-0.3.0/lib/rubygems_plugin.rb": cannot load such file -- rubygems_bundler/rubygems_bundler_installer (LoadError)

接下來:在XCode裏面將Command Line Tools裝好以後,升級一下RVM,然後安裝Ruby 1.9.3-p194。

rvm implode

就可以把rvm連同ruby一起卸載調,然後

curl -L https://get.rvm.io | bash -s stable --ruby

就可以一鍵將RVM,Ruby1.9.3p194連同Bundler一起裝好。


卸載不完全,需要自己手動卸載,所以把終端上提示的如:.bash_profile開頭的、.bashrc、.rvm、.zsh頭的文件文件刪了,


然後參考這個網址:http://www.it165.net/pro/html/201402/9213.html安裝CocoaPods

在安裝前,我們先做點小動作。

 由於安裝CocoaPods時我們要訪問cocoapods.org,該網站可能被我們大天朝牆了,這樣下載安裝可能會是龜速,幸好我們可以用淘寶的Ruby鏡像來訪問該網站,方法如下:

1.$ gem sources --remove https://rubygems.org/
2.$ gem sources -a http://ruby.taobao.org/
成功後,使用以下命令查看:
1.$ gem sources -l
可以看到替換鏡像成功:

 

 

1.*** CURRENT SOURCES ***
2. 
3.http://ruby.taobao.org/
接下來是真正的安裝,在終端輸入以下命令:
1.$ sudo gem install cocoapods
安裝輸出非常長,這裏就不貼出來了。

然後使用setup命令配置CocoaPods(這個命令也可以不運行,但是第一次使用pod命令時這個setup過程也會自動執行)

1.AppledeMacBook-Pro:~ apple$ pod setup
2.Setting up CocoaPods master repo
3.Setup completed (read-only access)
這個時間可能比較長,耐心等待下。

安裝完成後,最後讓我們cd 到項目工程所在的文件夾下

如cd /Users/wyapple/Downloads/kanaishinichi/

再執行pod update

結果如下:

Update all pods

Analyzing dependencies

CocoaPods 0.35.0.rc2 is available.

To update use: `gem install cocoapods --pre`

[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org

and the CHANGELOG for this version http://git.io/BaH8pQ.

Downloading dependencies

Installing TAXSpreadSheet (0.2.1)

Generating Pods project

Integrating client project

[!] From now on use `TAXHeaderSheetDemo.xcworkspace`.

[!] The use of implicit sources has been deprecated. To continue using all of the sources currently on your machine, add the following to the top of your Podfile:

    source 'https://github.com/CocoaPods/Specs.git'

這樣會生成一個.xcworkspace後綴的文件,運行的時候打開這個文件即可,到此運行成功!!!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章