【问题标题】:Swift pods cannot yet be integrated as static libraries FirebaseCoreInternal-librarySwift pod 还不能集成为静态库 FirebaseCoreInternal-library
【发布时间】:2022-06-20 16:39:59
【问题描述】:

我正在通过 Flutter 构建一个应用程序。我在执行“pod install”或“pod install --repo-update”或“pod update”时收到此错误消息,并且 pod 安装失败并停止。

错误信息:

[!] 以下 Swift pod 还不能作为静态集成 图书馆:

Swift pod FirebaseCoreInternal-library 依赖于 GoogleUtilities-library,它没有定义模块。选择加入 那些生成模块映射的目标(这是导入所必需的 它们在构建为静态库时来自 Swift),您可以设置 use_modular_headers! 全局在你的 Podfile 中,或者指定 :modular_headers => true 用于特定依赖项。

我的播客文件:

platform :ios, '11.0'

...

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

...

【问题讨论】:

  • 升级 Xcode 和 Firebase 版本时出现同样的问题。有解决这个问题的想法吗?我正在尝试使用另一种方法来导入 firebase(xcode 包管理器),不确定它是否有效。
  • 你可以试试下面的步骤,他们帮了我

标签: ios firebase flutter cocoapods


【解决方案1】:

我这样重写了我的代码:

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  pod 'Firebase/Analytics'

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

然后我正在做cd ios 和pod install,它对我有用。

您可以在这里找到更多信息:https://firebase.google.com/docs/ios/setup#available-pods

您还可以在此处找到示例并打开项目存储库: https://firebase.google.com/docs/samples.
在那里您可以查看config/Podfile 文件并将其用作示例。

【讨论】:

    猜你喜欢
    • 2021-10-19
    • 2023-02-11
    • 2015-09-17
    • 2016-06-05
    • 1970-01-01
    • 2015-06-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多