【问题标题】:Flutter Desktop: Firebase Auth could not find a valid GoogleService-Info.plistFlutter Desktop:Firebase Auth 找不到有效的 GoogleService-Info.plist
【发布时间】:2020-06-29 19:01:43
【问题描述】:

我创建了一个桌面颤振项目。我在 pubspec.yaml 库中添加了:
firebase_auth: ^ 0.15.5 + 2
阅读更多:https://github.com/FirebaseExtended/flutterfire

我打开 XcodeGoogle-Services.plist 插入到 runner 文件夹中。当我运行项目时出现此错误,我不知道我做错了什么程序。感谢您的帮助,谢谢。

在发布这篇文章之前,我已经在这里得到了通知,但找不到解决方案。
Could not find a valid GoogleService-Info.plist in your project

Launching lib/main.dart on macOS in debug mode...
Building macOS application...                                                  
2020-03-18 16:08:06.178 elahorcadocanariowebpanel[39295:504644] Configuring the default Firebase app...
2020-03-18 16:08:06.186 elahorcadocanariowebpanel[39295:504644] *** Terminating app due to uncaught exception 'com.firebase.core', reason: '`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff3a4048ab __exceptionPreprocess + 250
        1   libobjc.A.dylib                     0x00007fff706be805 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff3a404701 +[NSException raise:format:] + 189
        3   elahorcadocanariowebpanel           0x0000000101fd152a +[FIRApp configure] + 138
        4   elahorcadocanariowebpanel           0x0000000101ff6fa6 -[FLTFirebaseAuthPlugin init] + 214
        5   elahorcadocanariowebpanel           0x0000000101ff6d83 +[FLTFirebaseAuthPlugin registerWithRegistrar:] + 195
        6   elahorcadocanariowebpanel           0x0000000101f8cc3c $s25elahorcadocanariowebpanel24RegisterGeneratedPlugins8registryySo21FlutterPluginRegistry_p_tF + 188
        7   elahorcadocanariowebpanel           0x0000000101f8c49c $s25elahorcadocanariowebpanel17MainFlutterWindowC12awakeFromNibyyF + 492
        8   elahorcadocanariowebpanel           0x0000000101f8c62b $s25elahorcadocanariowebpanel17MainFlutterWindowC12awakeFromNibyyFTo + 43
        9   CoreFoundation                      0x00007fff3a37c965 -[NSSet makeObjectsPerformSelector:] + 231
        10  AppKit                              0x00007fff3752a2f0 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1485
        11  AppKit                              0x00007fff3751e156 loadNib + 401
        12  AppKit                              0x00007fff3751d719 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 693
        13  AppKit                              0x00007fff3751d36f -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
        14  AppKit                              0x00007fff3751d148 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 446
        15  AppKit                              0x00007fff3750f355 NSApplicationMain + 505
        16  elahorcadocanariowebpanel           0x0000000101f8cb6d main + 13
        17  libdyld.dylib                       0x00007fff71a2c7fd start + 1
        18  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Error waiting for a debug connection: The log reader stopped
unexpectedly.
Error launching application on macOS.

【问题讨论】:

    标签: swift flutter dart


    【解决方案1】:

    解决了我将它添加到 iOS 文件夹而不是 MacOS 文件夹。

    记住在 xcode 中允许传入和传出连接。 否则对他们不起作用。

    他们必须将文件放在资源文件夹中。

    【讨论】:

    • 您好,您是否使用了与 iOS 应用程序相同的 GoogleService-Info.plist?因为我在 firebase 上看不到您可以为 macos dekstop 应用程序创建项目吗? @DomingoMG
    • 是的,同一个文件
    猜你喜欢
    • 1970-01-01
    • 2018-01-01
    • 2018-03-06
    • 2018-09-08
    • 2018-12-10
    • 1970-01-01
    • 2016-03-21
    • 2022-01-06
    • 2021-04-09
    相关资源
    最近更新 更多