Your Podfile has had smart quotes sanitised

1.不管是執行pod install仍是pod update都卡在了Analyzing dependencies 或者 Updating local specs repositories不動html

解決: 緣由在於當執行以上兩個命令的時候會升級CocoaPods的spec倉庫,加一個參數能夠省略這一步,而後速度就會提高很多。加參數的命令以下:ios

[code]pod install --verbose --no-repo-update
pod update --verbose --no-repo-update

2.pod 命令運行報下面錯誤git

Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

解決: 不要使用文本編輯去編輯 Podfile ,使用Xcode編輯,或者使用終端敲命令去編輯。或者輸入格式錯誤,沒輸入運行版本:github

[code]platform:iOS, '7.0'

3.使用cocoapods導入第三方類庫後頭文件沒有代碼提示xcode

解決: 選擇Target -> Build Settings 菜單,找到\」User Header Search Paths\」設置項,新增一個值 "${SRCROOT}" ,而且選擇\」Recursive\」ruby

4.The dependency 「 is not used in any concrete target.app

解決: 這個錯誤是說明你沒有使用下面的格式, 將 Podfile編輯成下面的格式編輯器

[code] platform :ios,'7.0'
target '你的app的target名字' do
    pod 'AFNetworking', '2.0'
    pod 'SDWebImage', '3.7'
    ...
end

5.安裝錯誤ide

Setting up CocoaPods master repo 

[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master –depth=1 

Cloning into ‘master’… 

error: RPC failed; result=18, HTTP code = 200 

fatal: The remote end hung up unexpectedly 

fatal: early EOF 

fatal: index-pack failed

解決:post

[code]$ git config --global http.postBuffer 24288000
$ git config --list

若輸出 http.postbuffer=24288000, 就 OK了

6.在 pod install 時, 能夠生成要導入的第三庫, 可是其頭文件找不到, 文件有缺失, target 設置沒有完成.

[code] [!] The `Paopao [Debug]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

    [!] The `Paopao [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

      [!] The `Paopao [Release]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

       [!] The `Paopao [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

解決: 產生此警告的緣由是項目 Target 中的一些設置,CocoaPods 也作了默認的設置,若是兩個設置結果不一致,就會形成問題。

我想要使用 CocoaPods 中的設置,分別在個人項目中定義 PODS_ROOT 和 Other Linker Flags 的地方,把他們的值用$(inherited)替換掉,進入終端,執行 pod update , 而後錯誤沒了.

還有一種簡單粗暴的方法:

點擊項目文件 project.xcodeproj,右鍵顯示包內容,用文本編輯器打開project.pbxproj,刪除 OTHER_LDFLAGS 的地方,保存,執行

pod update

,錯誤沒了

7.引用要導入的三方庫缺乏 .o 文件的錯誤

解決: 在Build Setting 中的Other Linker Flags選項中加入$(OTHER_LDFLAGS)

8.還有一個複雜些的錯誤, 在爲新項目配置 cocoapods 時遇到的

[code]LoadError - dlopen(/Users/MyMac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/x86_64-darwin14.1.0/psych.bundle, 9): Library not loaded: /usr/local/lib/libyaml-0.2.dylib
  Referenced from: /Users/MyMac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/x86_64-darwin14.1.0/psych.bundle
  Reason: image not found - /Users/MyMac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/x86_64-darwin14.1.0/psych.bundle

參考:

http://www.lai18.com/content/7728346.html

http://www.jianshu.com/p/b5315bf42975

http://www.cnblogs.com/Rinpe/p/5015753.html

http://www.lai18.com/content/7728346.html
相關文章
相關標籤/搜索