【问题标题】:fatal error: 'openssl/x509.h' file not found in Flutter iOS build after integrating firestore致命错误:集成 firestore 后在 Flutter iOS 构建中找不到“openssl/x509.h”文件
【发布时间】:2021-08-21 14:39:26
【问题描述】:

我的 Flutter 应用已与 Firebase 集成,并且该应用使用 Firebase 核心和身份验证成功构建。但是,当我添加 cloud_firestore: ^2.2.0 依赖项时,在 iOS 上构建失败(仍然适用于 Android)并显示以下错误消息:

In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34:
    In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:35:
    In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/security_connector.h:33:
    /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/tsi/ssl_transport_security.h:28:10: fatal error: 'openssl/x509.h' file not found
    #include <openssl/x509.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.

当我删除依赖时,它会成功构建。

我尝试过运行pod installflutter clean,更改Xcode 和podfile 上的部署目标,以及安装/升级openssl。

和这个问题一样:Not found 'openssl/x509.h' when install cloud_firesore flutter?

【问题讨论】:

    标签: ios xcode firebase flutter google-cloud-firestore


    【解决方案1】:

    我通过在 /ios 内的终端中运行以下命令解决了这个问题:

    rm -rf Pods Podfile.lock
    
    pod cache clean --all
    
    pod install 
    

    (安装可能需要一些时间才能完成)

    来源:https://github.com/FirebaseExtended/flutterfire/issues/3203#issuecomment-743789416

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-20
      • 2021-09-04
      • 1970-01-01
      • 2021-11-18
      • 2021-07-21
      • 2021-03-26
      • 2021-03-06
      • 2016-08-02
      相关资源
      最近更新 更多