gpt4 book ai didi

ios - 安装 cloud_firestore 包后,在 Flutter 中的 iOS 模拟器上运行应用程序时出现错误

转载 作者:行者123 更新时间:2023-12-02 18:51:21 30 4
gpt4 key购买 nike

在安装 cloud_firestore 软件包后在 iOS 模拟器上运行时,我什至尝试过 pod update Firebase/Firestore 仍然出现以下错误。

即使我多次尝试删除 Podfile.lock,然后 flutter clean 然后 flutter run

注意:

  1. Flutter版本:Flutter 2.0.2

  2. Dart 2.12.1

    构建 iOS 应用程序失败Xcode 构建的错误输出:↳** 构建失败 **

    Xcode's output:

    In file included from /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/internal/thread_identity.cc:26:
    In file included from /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/call_once.h:34:
    /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/internal/invoke.h:42:10: fatal error: 'absl/meta/type_traits.h' file not found
    #include "absl/meta/type_traits.h"
    ^~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/internal/invoke.h:42:10: note: did not find header 'meta/type_traits.h' in framework 'absl' (loaded from
    '/Users/gwl/firebase_demo/build/ios/Debug-iphonesimulator/abseil')
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

    Could not build the application for the simulator.
    Error launching application on iPhone 11.

最佳答案

需要删除podfile.lock

然后你需要从 XCode 运行 iOS 文件夹来加载项目的资源

进入ios文件夹并执行pod install,如果不存在则执行pod init,然后执行pod install

请尝试 Xcode -> 产品 -> 运行

关于ios - 安装 cloud_firestore 包后,在 Flutter 中的 iOS 模拟器上运行应用程序时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66710661/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com