zoukankan      html  css  js  c++  java
  • CocoaPods出错

    1

    Error:

    pod search Masonry
    /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/user_interface/error_report.rb:135:in `error_from_podfile': invalid byte sequence in UTF-8 (ArgumentError)
        from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/user_interface/error_report.rb:41:in `report'
        from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/command.rb:66:in `report_error'
        from /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:396:in `handle_exception'
        from /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:337:in `rescue in run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/command.rb:52:in `run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/bin/pod:55:in `<top (required)>'
        from /usr/local/bin/pod:22:in `load'

    Solution:

    https://github.com/CocoaPods/CocoaPods/issues/5338

    我按照里面的描述,删除了~/Library/Caches/CocoaPods/search_index.json文件,pod search奇迹般的可以了。

    其中也大概提到出现这个问题的原因,可能是CocoaPods在创建索引时,我们ctrl+c取消了这个操作,这导致索引生成的某些字符有问题,所以我们删除索引文件,重新生成即可。

    2

    cocoaPods导入第三方库,但头文件却显示没有发现 嘗試pod install後,Product -> Clear Build Folder (按住option鍵) 清理一下,然後重新Build一次

    CDN: Repo trunk does not exist!

    解决方案:
    https://github.com/CocoaPods/CocoaPods/issues/9338

    rm -rf ~/.cocoapods/repos


  • 相关阅读:
    大道至简阅读笔记01
    3.2-3.8 第三周总结
    全国疫情统计可视化地图 01
    数据爬取
    全国疫情统计可视化地图
    第3周总结
    第2周总结
    开课博客
    数组
    从小工到专家 读后感2
  • 原文地址:https://www.cnblogs.com/developer-qin/p/7919308.html
Copyright © 2011-2022 走看看