简体   繁体   English

Android开发人员控制台中崩溃报告的问题

[英]Android trouble with crash reports in developer console

So I'm building my app with proguard which obfuscates the code, and I am uploading my mapping.txt to the deobfuscation files. 因此,我要使用混淆代码的proguard来构建我的应用程序,然后将我的mapping.txt上传到反混淆文件中。 My crash reports show the class and method names, but they don't show line numbers. 我的崩溃报告显示了类和方法的名称,但没有显示行号。

In my build.gradle: 在我的build.gradle中:

    buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

So then I upload as a deobfuscation file: ProjectFolder/app/build/outputs/mapping/release/mapping.txt 因此,我将其作为反混淆文件上传: ProjectFolder/app/build/outputs/mapping/release/mapping.txt

So my question is: 所以我的问题是:

  • Am I uploading the correct file for deobfuscation? 我是否上传了正确的文件以进行模糊处理? There is also seeds.txt, dump.txt, usage.txt in that directory. 该目录中还包含seeds.txt,dump.txt,usage.txt。

  • Is it possible to get line numbers in my crash reports through play store when building with proguard? 使用proguard进行构建时,是否可以通过play store在崩溃报告中获取行号?

Yes, I believe mapping.txt is the right one. 是的,我相信mapping.txt是正确的选择。

As for viewing line numbers, I added the following to my proguard-rules.pro file: 至于查看行号,我在proguard-rules.pro文件中添加了以下内容:

# To be able to see line numbers in stack traces

-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM