![](/img/trans.png)
[英]An error occurred while processing the post-install hook of the Podfile. Not able to run flutter project on iOS simulator getting pod error
[英]It's about the cocoapods. An error occurred when I install my podfile. It's like the syntax error about ruby
我尝试了我搜索过的所有内容,例如重新安装我的 cocoapods,更新我的 gem 或 cocoapads 的版本,但它不起作用。 错误日志是这样的:
/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 false:FalseClass (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:310:in `new'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:310: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:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
感谢您的帮助,我终于找到了这个问题的原因。 那是因为我有三个不同版本的 Xcode。 但我只使用最新版本。 所以当我切换Xcode的默认版本时,问题解决了。 就像:sudo xcode-select --switch [你的 xcode 路径]。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.