简体   繁体   English

处理 Podfile 的安装后挂钩时出错。 无法在 iOS 模拟器上运行颤振项目得到 pod 错误

[英]An error occurred while processing the post-install hook of the Podfile. Not able to run flutter project on iOS simulator getting pod error

I have setup a firebase project for my flutter project but while running the project I'm getting the below error.我已经为我的颤振项目设置了一个 firebase 项目,但是在运行项目时出现以下错误。 I have tried to install the pod properly but still, there is an error while executing.我已尝试正确安装 pod,但执行时仍然出现错误。 Please if you have any idea let me know.如果您有任何想法,请告诉我。 I have shared the console log我已共享控制台日志

 - 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.

navigate to ios directory then Run these commands导航到 ios 目录,然后运行这些命令

cd ios (navigate to ios directory)
flutter precache --ios
pod install 

in your pod file,在你的 pod 文件中,

# platform :ios, '9.0'

uncomment this line and change 9.0 to 10.0 and run the app.取消注释此行并将 9.0 更改为 10.0 并运行应用程序。 it will take some time at the first.一开始需要一些时间。 like 20 - 30 minutes.像20-30分钟。

I have resolved this issue, the issue with the podfile hence I have run the following command and it works.我已经解决了这个问题,即 podfile 的问题,因此我运行了以下命令并且它可以工作。

sudo gem install cocoapods sudo gem 安装 cocoapods

for more information I have raised this on GitHub you can find here有关我在 GitHub 上提出的更多信息,您可以在此处找到

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter pod:处理Podfile的post-install钩子时出错 - Flutter pod: An error occurred while processing the post-install hook of the Podfile Flutter 项目中的“处理 Podfile 的安装后挂钩时发生错误” - “An error occurred while processing the post-install hook of the Podfile” in Flutter project 处理 Podfile 的 post-install hook 时发生错误 - An error occurred while processing the post-install hook of the Podfile 执行“pod install”时出现Podfile错误? - Podfile error while doing “pod install”? 这是关于可可豆的。 安装 podfile 时发生错误。 就像关于 ruby​​ 的语法错误 - It's about the cocoapods. An error occurred when I install my podfile. It's like the syntax error about ruby Flutter iOS 构建失败 Pod 文件错误:Podfile 已过期 - Flutter iOS build failed an error of pod files: Podfile is out of date 无法在 ios 模拟器上运行我的 flutter 应用程序,该模拟器在 android 模拟器上完美运行。 运行 pod install 时出错 - Unable to run my flutter app on ios simulator which is working perfectly on android simulator. Error running pod install React Native - Podfile 的安装后挂钩期间出错 - React Native - Error during post install hook for Podfile Flutter 在 IOS 上运行崩溃运行 pod install 错误 - Flutter run crash on IOS Error running pod install 容器安装失败,并显示以下错误:在iOS中安装容器时,“容器文件(来自`../`)`由`Podfile`所需要 - pod install failed with error: Library (from `../`)` required by `Podfile` when pod install in iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM