簡體   English   中英

在Firebase / CrashReporting中使用調試構建的未定義符號

[英]Undefined symbols with debug builds in Firebase/CrashReporting

自從通過Cocoapods更新到Firebase崩潰報告3.8.0后,我在調試模式的構建期間看到以下錯誤。 我能夠在沒有錯誤的情況下構建發布模式。

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設置為NO時,會發生這種情況。

一些Firebase SDK依賴於從源構建的pod。 默認情況下,的CocoaPods設置生成活躍體系結構只YES在調試運行時,從源代碼構建的所有吊艙。 這種不匹配會導致您提到的缺失符號。

有兩種方法可以解決此問題:

  1. 切換構建活動體系結構僅在主項目的調試中為YES
  2. 在調試時(從這篇文章中獲取 )將您的pod的Build Active Architecture Only設置NO

     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 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM