我有与Firebase Crashlytics链接的React Native App
。
问题是firebase发送像下面这样的不可读堆栈跟踪。有任何方法可以读取此类错误。
我只想知道何时引发错误。
这是我的堆栈跟踪
最佳答案
这称为混淆,您有意义的符号被替换为无意义的符号,以减少生产中的文件大小。通常,在构建应用程序时,它会生成反模糊化文件(通常以 .dSYM 文件的形式),该文件可用于象征您的应用程序。
根据所使用的平台,获取.dSYM的方法有所不同,但是firebase has a handy guide that should be able to further help in this specific case.
出于文档目的,我将对该答案中提供的步骤进行硬编码。
的iOS
Open your project in Xcode, and select the project file in the Xcode Navigator.
Select your main build target from the Select a project or target dropdown.
Open the target's Build Settings tab.
Click All near the top of the tab.
Search for "debug information format".
Set Debug Information Format to DWARF with dSYM File.
安卓
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
关于firebase - react native 堆栈跟踪,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53012370/