ios - Xcode:找不到-lPods 的库

标签 ios xcode react-native cocoapods

有一个 react-native 项目,它不会建立在目标“Staging”上,因为我已经设置了 cocoapods 并从那时起使用 xcworkspace 文件(react- 的 firebase 集成需要 native 火力基地)。尝试为目标“暂存”构建时,我会收到此错误:

ld: library not found for -lPods-[app]
clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

它适用于调试,并且(至少它不会抛出错误)当我存档项目时。

由于代码推送,我有一个“暂存”目标。在版本 0.48.4 和 Xcode 9 中使用 react-native(在 this guide 之后创建,但在使用 cocoapods 之前)

我的播客文件:

platform :ios, '9.0'

target 'xx' do
  #use_frameworks!

  # Pods 
  pod 'Firebase/Core'
  pod 'Firebase/Analytics'
  pod 'Firebase/Database'
  pod 'Firebase/Messaging'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'

end

尝试使用和不使用 use_frameworks!、清理项目、删除 DerivedData、分解和重新集成 pod。

什么会导致这种情况? (如果您需要更多信息,请告诉我)

最佳答案

什么对我有用:

  1. 使用 pod deintegrate 分解所有 pod(使用 enter link description here )
  2. pod 安装
  3. 删除了 [Project name] > Frameworks > Pods_[Project name].framework(它是红色的,但实际上有更多的文件是红色的)
  4. 构建成功

是在 this post 的帮助下完成的.还要感谢莫里斯试图帮助我。

关于ios - Xcode:找不到-lPods 的库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48228153/

相关文章:

ios - Firebase 会自动加密密码吗?

ios - 使用 Affinity Designer 的带有 xCode 的矢量 PDF

xcode - 将 .xcassets 文件添加到 Xcode 框架项目

javascript - 在自定义组件中 react native 访问引用

ios - OneSignal + React Native + 后台通知

android - Unity 3D Mobile 和 Windows Azure

ios - 分段控制更改时更改 View Controller

ios - 如何最好地模块化 Xcode 项目以加速构建

objective-c - 声音合成的内存泄漏

react-native - react 原生平面列表导航