Unhandled exception:
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>'
#0 ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:517:11)
<asynchronous suspension>
#1 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#2 main (file:///Users/dylanguzman/.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.6+1/bin/flutterfire.dart:57:5)
<asynchronous suspension>
我试过了:
flutterfire configure --project=test-app-egr423
使用以下Firebase应用程序成功生成Firebase配置文件libfirebase_options.dart:
在运行flutterfire configure
时,我在Macbook Air M1上使用flutterfire
版本0.2.7
时遇到了同样的错误。在我的情况下,我通过打开终端并运行以下命令来解决这个问题:
gem install xcodeproj
或者,如果运行命令时出现任何权限错误:
sudo gem install xcodeproj
我希望这也能为你解决问题。我从这个Github问题中找到了解决方案。
唯一对我有效的事情和其他人说的一样。我曾试图通过brew安装xcodeproj,但存在链接问题,但我使用安装了它
sudo gem install xcodeproj
现在flatterfire配置正在工作。