Flutterfire 配置 - 未处理的异常和没有 firebase 初始化

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

我正在尝试使用官方文档中显示的新方法在 MacOS 上配置 firebase,如下所示:

firebase login
dart pub global activate flutterfire_cli
flutter fire configure

它产生以下错误。我搜索了这个但没有找到任何解决方案。你能帮忙吗?

请注意 flutter doctor 在任何类别中都没有显示错误,并且同一项目正在 android 上正确使用 google.infoplist 文件。我只在 MacOS 上使用新的初始化方法时遇到这个问题。\

错误:

username@192 MyApp % flutterfire configure
i Found 3 Firebase projects. Selecting project [Myappname]                                                                                                           
✔ Which platforms should your configuration support (use arrow keys & space to select)? · android, ios                                                                 
i Firebase android app [app-package] registered.                                                                                                                          
i Firebase ios app [app-package] registered.                                                                                                                              
Unhandled exception:
Exception: /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:88:in `require': cannot load such file -- xcodeproj (LoadError)
        from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:88:in `require'
        from -e:1:in `<main>'

#0      ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:540:11)
<asynchronous suspension>
#1      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#2      main (file:///Users/username/.pub-cache/hosted/pub.dev/flutterfire_cli-0.2.7/bin/flutterfire.dart:57:5)
<asynchronous suspension>
flutter firebase
1个回答
0
投票

尝试在您的终端中安装它

 gem install xcodeproj

如果您最终遇到权限错误,请考虑运行

sudo chown -R <your_user> $HOME/.rbenv

然后重新执行之前的命令

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