【问题标题】:Pod init or pod update is giving the below errorPod init 或 pod update 出现以下错误
【发布时间】:2020-01-23 19:36:38
【问题描述】:

我无法使用 pod install 或 update。我再次安装了 cocoapods 并更新了 gems。有什么办法可以解决这个问题。我花了一天的时间,但没有运气。 这是错误:

  Update all pods

   Updating local specs repositories
   /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods- 
   core/source/metadata.rb:15:in `initialize': undefined method `with_indifferent_access' for #<String:0x00007fa4df813c48> (NoMethodError)
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/metadata.rb:28:in `new'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/metadata.rb:28:in `from_file'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source.rb:434:in `refresh_metadata'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:55:in `refresh_metadata'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source.rb:31:in `initialize'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:29:in `initialize'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:308:in `new'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:308:in `block in source_from_path'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:315:in `source_from_path'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:324:in `block in aggregate_with_repos'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:324:in `map'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:324:in `aggregate_with_repos'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:24:in `aggregate'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:58:in `all'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface/error_report.rb:173:in `repo_information'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface/error_report.rb:77:in `stack'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface/error_report.rb:24:in `report'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'

【问题讨论】:

    标签: ios rubygems cocoapods


    【解决方案1】:

    为了正确,you've already uninstalled and reinstalled the Cocoapods?因为那个解决方案总是对我有用。

    这是使用 Xcode 还是其他 IDE?

    【讨论】:

    • 我已经安装了 gem 2.3 ,然后安装了最新的 cocoapods 。移动到项目文件并按照以下步骤操作:stackoverflow.com/questions/13751147/…,但最后一步“pod init”我得到了与我的问题中提到的相同的错误。是的,这是 XCode。
    猜你喜欢
    • 2021-12-14
    • 1970-01-01
    • 2021-06-17
    • 2016-10-16
    • 2020-04-24
    • 2016-04-03
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    相关资源
    最近更新 更多