框架未找到FirebaseAnalytics

Nui*_*ibb 22 google-analytics objective-c ios firebase-analytics

我将CocoaPod的Google Analytics添加到了我的项目中,但是我的应用程序崩溃并发出以下错误.

ld: framework not found FirebaseAnalytics
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决这个问题?我按照谷歌的这个教程将Google Analytics集成到我的项目中.

Mar*_*cel 63

您可能正在使用cocoapods添加Firebase.确保在目标的构建设置中,Debug和Release的"框架搜索路径"都以$(inherited).

pod依赖项的构建设置在xcconfig文件中定义,如果$(inherited)在目标的构建设置中没有,则将忽略此文件中的设置.

  • 需要在每个目标设置中进行此操作,而不是在项目设置中 (2认同)

Gab*_*oux 11

我有同样的错误,我的Framework Search Pathsin Build Settings已经设置$(inherited)为Debug和Release.

我设法解决了这个问题:https: //stackoverflow.com/a/38246169/1092815

换句话说,Podfile.lock有一些不好的版本,运行它解决了我的问题:

pod update
pod install
Run Code Online (Sandbox Code Playgroud)


小智 6

我也有这个问题并解决了这个:

pod deintegrate && pod install

关于 pod deintegrate 的 CocoaPods 文档:https ://guides.cocoapods.org/terminal/commands.html#pod_deintegrate