gpt4 book ai didi

ios - Firebase/CrashReporting 中带有调试版本的 undefined symbol

转载 作者:可可西里 更新时间:2023-11-01 05:32:56 24 4
gpt4 key购买 nike

自从通过 Cocoapods 更新到 Firebase 崩溃报告 3.8.0 后,我在 Debug模式构建期间看到以下错误。我能够在 Release模式下构建而不会出错。

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GTMLogNoFilter", referenced from:
objc-class-ref in FirebaseCrash(FCRSystemLogger_6532fb37dc095ffa73463b57baf5fca7.o)
"_OBJC_CLASS_$_GTMLogBasicFormatter", referenced from:
objc-class-ref in FirebaseCrash(FCRSystemLogger_6532fb37dc095ffa73463b57baf5fca7.o)
"_OBJC_CLASS_$_GTMLogger", referenced from:
objc-class-ref in FirebaseCrash(FCRSystemLogger_6532fb37dc095ffa73463b57baf5fca7.o)
objc-class-ref in FirebaseCrash(uploader_089041b840f448492d858d7daf481e47.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

当 XCode 设置 Build Active Architecture Only 在 Debug模式下设置为 NO 时,会发生这种情况。

一些 Firebase SDK 依赖于从源代码构建的 pod。默认情况下,CocoaPods 将 Build Active Architecture Only 设置为 YES,以便在 Debug 中运行时从源代码构建的所有 Pod。这种不匹配会导致您提到的符号丢失。

有两种方法可以解决这个问题:

  1. 在您的调试中将 Build Active Architecture Only 切换为 YES主要项目。
  2. 在调试时将您的 pod 的 Build Active Architecture Only 设置为 NO(取自此 post ):

    post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
    config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
    end
    end
    end

关于ios - Firebase/CrashReporting 中带有调试版本的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40314938/

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