【问题标题】:flutter Ios build fails after upgrading firebase core升级firebase核心后颤动Ios构建失败
【发布时间】:2020-12-14 07:16:36
【问题描述】:

我有一个与 firebase 核心(版本 0.4.0)一起工作的 Flutter 应用程序。我将 firebase_core 升级到版本 0.5.0 并根据迁移进行了所有更改。之后 ios build 出现以下错误

Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
 
Running Xcode build...                                                  
                                                   
Xcode build done.                                           95.9s
Failed to build iOS app
Error output from Xcode build:
↳
    AssertMacros: amdErr = AMDeviceConnect(tmpDevice) == 0 ,  file:
    /BuildRoot/Library/Caches/com.apple.xbs/Sources/MobileDevice/MobileDevice-1190.100.2.1/Source/AMDevicePowerAssertion.c, line: 224, value: -402653083
    ** BUILD FAILED **


Xcode's output:
↳
    <module-includes>:1:1: error: umbrella header for module 'GoogleUtilities' does not include header 'GULLoggerCodes.h' [-Werror,-Wincomplete-umbrella]
    #import "Headers/GoogleUtilities-umbrella.h"
    ^
    1 error generated.
    In file included from /Users/yogesh/projects/mobile-flutter/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m:24:
    /Users/yogesh/projects/mobile-flutter/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Logger/Private/GULLogger.h:22:9: fatal error: could not build module
    'GoogleUtilities'
    #import <GoogleUtilities/GULLoggerLevel.h>
     ~~~~~~~^
    2 errors generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

它在 android 中运行良好,甚至从 xcode 构建 ios 也运行良好。它从失败的命令行构建和运行 (flutter run)

以下是我的包含 firebase 依赖项的 pubspec 文件

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^0.5.0
  firebase_auth: ^0.18.0+1
  cloud_firestore: ^0.14.0+2
  sqflite:
  path:
  progress_dialog: ^1.2.4

我无法理解是因为库错误还是我这边的原因,因为它似乎是 lib 错误,但从 xcode 构建的 android 和 ios 完全正常。

【问题讨论】:

    标签: ios firebase flutter


    【解决方案1】:

    运行命令

    颤抖干净

    然后重新运行适用于我的应用程序。

    【讨论】:

      【解决方案2】:

      我刚刚遇到了同样的问题,我能够从 XCode Runner 运行应用程序,但不能从 Android Studio 运行应用程序,并显示相同的错误消息。我设法通过以下步骤解决了这个问题:

      1. firebase_analytics: ^6.0.0 添加到 pubspec.yaml。
      2. 然后删除PodfilePodfile.lock
      3. 最后再次运行它。

      但是我不能告诉你为什么它完全解决了这个问题,所以不能真正保证这对你有用。

      【讨论】:

      • 是的,这确实有效,我也无法理解为什么。谢谢
      • 你救了我的命!谢谢!
      • 这似乎不需要对 iOS 文件夹进行太多操作。
      【解决方案3】:

      删除 PodfilePodfile.lock 并运行它,它会工作

      【讨论】:

        猜你喜欢
        • 2021-11-01
        • 2021-01-21
        • 2021-12-19
        • 2021-08-13
        • 2021-05-25
        • 2019-10-16
        • 2016-12-02
        • 2017-05-21
        相关资源
        最近更新 更多