本文介绍了Crashlytics未上传映射文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够在Crashlytics中看到发布版本的崩溃,但它们仍然被混淆.我正在使用:

I'm able to see crashes for a release build in Crashlytics but they are still obfuscated. I'm using:

implementation "com.google.firebase:firebase-core:16.0.5"
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation "com.crashlytics.sdk.android:crashlytics:2.9.6"

和(项目级别)

    classpath 'com.android.tools.build:gradle:3.2.1'
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.26.1' // Crashlytics plugin
    classpath "net.ltgt.gradle:gradle-apt-plugin:0.15"

我已按照 https://firebase.google上的说明进行操作. com/docs/crashlytics/get-deobfuscated-report ,特别是我从config.txt

I've followed the instructions at https://firebase.google.com/docs/crashlytics/get-deobfuscated-report, in particular I've deleted the -printmapping <path>/mapping.txt line from config.txt

当我查看Crashlytics日志时,看不到映射文件的上载.

When I look in the Crashlytics log I do not see an upload of the mapping file.

当我使用以下项目为项目的早期版本运行发行版时:

When I run a release build for an earlier version of my project using:

implementation "com.google.firebase:firebase-core:11.8.0"
implementation "com.google.android.gms:play-services-base:11.8.0"
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
    transitive = true
}

和(项目级别)

    classpath 'com.android.tools.build:gradle:3.1.3'
    classpath 'com.google.gms:google-services:3.0.0'
    classpath 'io.fabric.tools:gradle:1.24.4'

然后我在crashlytics.log中看到了清晰的堆栈跟踪和映射上传消息:

then I see unobfuscated stack traces and mapping upload messages in crashlytics.log:

2018-11-21 10:52:22.573 [DEBUG] (Daemon worker) com.crashlytics  - Deobfuscation file(s) uploaded.

有什么想法吗?我在Crashlytics日志中看不到最新(不工作)版本的任何与映射文件有关的日志,并且在gradle输出中看不到gradle上传任务正在运行,而对于较旧(工作)版本,我看到了以下:

Any ideas what's wrong? I don't see any of the mapping file related logs for the recent (not working) version in the Crashlytics log and I don't see the gradle upload task running in the gradle output whereas for the older (working) version I see the following:

:app:crashlyticsUploadDeobsRelease (Thread[Daemon worker Thread 2,5,main]) completed. Took 1.28 secs.

推荐答案

Argh.好了,有一个简单的解决方法,可惜我花了很长时间才找到它.我始终(直到现在)使用./gradlew iR(./gradlew installRelease的快捷方式)构建并在本地安装发行版本.我尝试了(经过令人尴尬的长时间)而不是从Android Studio(Build > Generate Signed Bundle / Apk)进行构建.一旦我做到了,它就会奏效.

Argh. Well there was a simple fix, shame it took me so long to find it. I always (until now) build and locally install a release build using ./gradlew iR (shortcut for ./gradlew installRelease). I tried (after an embarrassingly long time) building from Android Studio instead (Build > Generate Signed Bundle / Apk). As soon as I did that it worked.

如果我发现基于非AS的发布适用于Crashlytics,我将在此处进行更新.同时,如果您遇到问题,请查看示例 https://github .com/firebase/quickstart-android/tree/master/crash .您可以接受它,放入自己的google-services.json并按上述方式发布,然后检查crashlytics.log(请参见上文).

I'll update here if and when I figure out non-AS based releasing works with Crashlytics. Meanwhile if you're having problems take a look at the sample https://github.com/firebase/quickstart-android/tree/master/crash.You can take that, drop in your own google-services.json and release as above, then check crashlytics.log (see above) .

这篇关于Crashlytics未上传映射文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 10:42