gpt4 book ai didi

ios - 处理 Podfile 的安装后 Hook 时出错。无法在 iOS 模拟器上运行 flutter 项目出现 pod 错误

转载 作者:行者123 更新时间:2023-12-05 02:38:51 28 4
gpt4 key购买 nike

我已经为我的 flutter 项目设置了一个 firebase 项目,但是在运行该项目时出现以下错误。我已尝试正确安装 pod,但仍然在执行时出错。如果您有任何想法,请告诉我。我已经分享了控制台日志

- Generating dummy source at `Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m`
- Generating deterministic UUIDs
- Stabilizing target UUIDs
- Running post install hooks
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each_child' for #<Dir:0x00007fd6d1da4a58>

Documents/Flutter/packages/flutter_tools/bin/podhelper.rb:57:in `block in flutter_additional_ios_build_settings'
Documents/Flutter/packages/flutter_tools/bin/podhelper.rb:54:in `each'
Documents/Flutter/packages/flutter_tools/bin/podhelper.rb:54:in `flutter_additional_ios_build_settings'
flutter-project/ios/Podfile:41:in `block (3 levels) in from_ruby'
flutter-projecty/ios/Podfile:40:in `each'
flutter-project/ios/Podfile:40:in `block (2 levels) in from_ruby'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.10.2/lib/cocoapods-core/podfile.rb:179:in
`post_install!'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:897:in
`run_podfile_post_install_hook'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:885:in `block in
run_podfile_post_install_hooks'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/user_interface.rb:145:in `message'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:884:in
`run_podfile_post_install_hooks'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:329:in `block (2 levels) in
create_and_save_projects'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/xcode/pods_project_generator/pod
s_project_writer.rb:61:in `write!'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:328:in `block in
create_and_save_projects'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/user_interface.rb:64:in `section'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:307:in
`create_and_save_projects'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:178:in `integrate'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:166:in `install!'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/command/install.rb:52:in `run'
/Users/.rvm/gems/ruby-2.5.5/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/lib/cocoapods/command.rb:52:in `run'
/Users/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.2/bin/pod:55:in `<top (required)>'
/Users/.rvm/gems/ruby-2.5.5/bin/pod:23:in `load'
/Users/.rvm/gems/ruby-2.5.5/bin/pod:23:in `<main>'

Error running pod install
Error launching application on iPhone 8.

最佳答案

我已经解决了这个问题,podfile 的问题因此我运行了以下命令并且它有效。

sudo gem install cocoapods

有关我在 GitHub 上提出的更多信息,您可以找到 here

关于ios - 处理 Podfile 的安装后 Hook 时出错。无法在 iOS 模拟器上运行 flutter 项目出现 pod 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69423027/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com