如何将映射文件上传到Firebase Crashlytics? [英] How to upload a mapping file to Firebase Crashlytics?
问题描述
在旧的崩溃报告中,有一种简单的上传方法.我在Crashlytics部分中找不到它
In the old Crash reporting - there is easy way to upload. i didn't find it in the Crashlytics section
推荐答案
UPDATE: Firebase update their docs: see here
不再需要手动上传映射文件.
There is no need anymore to manually upload mapping file.
1-要保留Crashlytics可读的崩溃报告所需的信息,请在配置文件中添加以下几行:
1 - To preserve the info Crashlytics needs for readable crash reports, add the following lines to your config file:
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
2-要让Crashlytics自动上传ProGuard或DexGuard映射文件,请从配置文件( app/proguard-rules.pro )中删除以下行:
2 - To let Crashlytics automatically upload the ProGuard or DexGuard mapping file, remove this line from the config file (app/proguard-rules.pro):
-printmapping mapping.txt
要使用ProGuard进行更快的构建,请排除Crashlytics. 您的配置文件的以下几行:
For faster builds with ProGuard, exclude Crashlytics. Add the following lines to your config file:
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
这篇关于如何将映射文件上传到Firebase Crashlytics?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!