Flutter Pod:处理Podfile的后安装后钩时发生了错误
问题是,当我在安装插件后运行flutter应用程序(在这种情况下为Firebase_core)时,我会遇到一个错误:
处理处理后安装后挂钩时发生了错误 podfile。
未定义的局部变量或方法`继续 #< pod :: podfile:0x000000010999e67b8 @defined_in_file =#pathName:/polumes/coding-it/coding/projects/flutter_37hours/ios/ios/podfile, @Internal_hash = {}, @root_target_definitions = [#< pod :: podfile :: targetDefinition 标签= pods>], @current_target_definition =#< pod :: podfile :: targetDefinition label = pods>,@post_install_callback =#< proc:0x000000010109a07e40 /卷/coding-it/coding/projects/flutter_37hours/ios/podfile:37>, @installation_options =#< pod :: installer :: installationOptions:0x000000010109ab6eb8 @clean = true, @deduplicate_targets = true, @cestricinistic_uuids = true, @Integrate_targets = true, @lock_pod_sources = true, @warn_for_multipy_pod_sources = true, @warn_for_unused_master_specs_repo = true, @share_schemes_for_development_pods = false, @disable_input_output_paths = false, @prisever_pod_file_structure = false, @generate_multiple_pod_projects = false, @cormemental_installation = false, @skip_pods_project_generation = false>>
如果xcframework_file.start_with?(“。”)#隐藏文件,可能在外部磁盘上继续。
问题似乎与继续词有关,但是我不知道为什么会发生这种情况以及如何解决问题:( 我尝试过多次重新安装Cocoapods,从Homebrew和Rubygems开始,我尝试了Flutter Clean,我尝试重新安装Ruby和更改版本。没有运气。希望有人可以帮助我,谢谢
The problem is that when I run a flutter app after having installed a plugin (firebase_core in this case) I get an error:
An error occurred while processing the post-install hook of the
Podfile.undefined local variable or method `continue' for
#<Pod::Podfile:0x00000001099e67b8 @defined_in_file=#Pathname:/Volumes/Coding-IT/Coding/Projects/flutter_37hours/ios/Podfile,
@internal_hash={},
@root_target_definitions=[#<Pod::Podfile::TargetDefinition
label=Pods>],
@current_target_definition=#<Pod::Podfile::TargetDefinition
label=Pods>, @post_install_callback=#<Proc:0x0000000109a07e40
/Volumes/Coding-IT/Coding/Projects/flutter_37hours/ios/Podfile:37>,
@installation_options=#<Pod::Installer::InstallationOptions:0x0000000109ab6eb8
@clean=true, @deduplicate_targets=true, @deterministic_uuids=true,
@integrate_targets=true, @lock_pod_sources=true,
@warn_for_multiple_pod_sources=true,
@warn_for_unused_master_specs_repo=true,
@share_schemes_for_development_pods=false,
@disable_input_output_paths=false, @preserve_pod_file_structure=false,
@generate_multiple_pod_projects=false,
@incremental_installation=false, @skip_pods_project_generation=false>>continue if xcframework_file.start_with?(".") # Hidden file, possibly on external disk.
The problem appears to be with the continue word, but I don't know exactly why this is happening and how to solve the problem :(
I've tried reinstalling cocoapods multiple times, from homebrew and from rubygems, I tried flutter clean, I tried reinstalling ruby and changing versions. No luck. Hope someone can help me, thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也在调查。它似乎与这个问题有关: https://github.com/github.com/flutter/flutter/flutter/flutter/issues/issues /104118
但它已关闭,修复程序似乎与Flutter Master分支合并。 idk!可能需要等待下一个扑朔迷离更新。
编辑 - 我刚刚在Beta通道上尝试了此操作,并且已完成POD安装。因此,您可以等到它在稳定或开关通道上运行iOS。干杯!
I'm looking into this too. It seems to be related to this issue: https://github.com/flutter/flutter/issues/104118
But it's closed the fix seems to be merged with flutter master branch. Idk! Might need to wait for next flutter update.
edit - I just tried this on beta channel and pod install completed. So you can wait till it's on stable or switch channels to run iOS. Cheers!
任何人都面临同一问题,
移动到iOS文件夹,然后运行Pre flutter Pre Cache,然后pod
instanci Ruby&gt;&gt; brew install rbenv 3.1.3(或使用您想要的任何版本)
用于Cocopoads&gt;&gt;
删除Flutter SDK,然后将载荷重新下载到之前存在的相同路径。
然后在您的项目中,移至iOS文件夹并运行
Incase anyone is facing this same issue,
move to iOS folder, run flutter pre cache, then pod install
For ruby >> brew install rbenv 3.1.3 (or use any version you want)
For cocopoads>>
Delete Flutter SDK, and redownload to the same path it existed before.
Then on your project, move to your ios folder and run