Flutter 火灾异常:无法加载此类文件 -- xcodeproj

问题描述 投票:0回答:1

我今天在尝试为我的 Flutter 项目运行命令

flutterfire configure --project=<project>
时遇到此错误。

i Found 13 Firebase projects. Selecting project <project>.                                                                                                                                                              
✔ Which platforms should your configuration support (use arrow keys & space to select)? · android, ios                                                                                                                        
i Firebase android app <package_name> registered.                                                                                                                                                                               
i Firebase ios app <package_name> registered.                                                                                                                                                                                   
Exception: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from -e:1:in `<main>'

我也尝试运行命令

sudo gem install xcodeproj
来安装xcodeproj,但收到错误:

ERROR:  Could not find a valid gem 'xcodeproj' (>= 0) in any repository

我该如何修复它?

附加:我正在使用 Mac Intel、MacO:Sonoma 14.4.1

谢谢!

ruby flutter firebase
1个回答
0
投票

我已经修好了。我更正了

soucres
文件中的
.gemrc

':sources: [] => :sources: ["https://rubygems.org/"]

enter image description here

然后我运行命令

sudo gem install xcodeproj

flutterfire configure --project=<project>

我在这里记下这一点,以便它可能对某人有用。

© www.soinside.com 2019 - 2024. All rights reserved.