Crashes and ANRs on Android produce a stack trace, which is a snapshot of the sequence of nested functions called in your program up to the moment it crashed. These snapshots can help you identify and fix any problems in the source.
If your app or game was developed using Java and you use ProGuard to optimize and obfuscate your app, you can upload a ProGuard mapping file for each version of your app in Play Console. If your app or game was developed using native code, like C++, you can upload a debug symbols file for each version of your app in Play Console. This makes it easier to analyze and fix your crashes and ANRs.
Important: Only ReTrace-compatible mapping files are supported for deobfuscation of apps compiled in Java. This is the same format used by ProGuard or R8.
Step 1: Generate a deobfuscation or symbolication file
To deobfuscate or symbolicate your app's crashes and ANRs for a version of your app, you first need to generate the required files for the same version of your app. You must generate and upload a file for each new version of your app for deobfuscation or symbolication to work.
Step 2: Upload a deobfuscation or symbolication file
To deobfuscate or symbolicate your app's crashes and ANRs for a version of your app, you must upload the deobfuscation or symbolication files for each version of your app.
Important: This step is only required for developers using APKs. If you’re using an app bundle and Android Gradle plugin version 4.1 or later, then there's nothing you need to do. We'll automatically grab the deobfuscation file from the bundle and you can skip to Step 3: View deobfuscated crash stack traces. You can learn more about app bundles on the Android Developers site.
Step 3: View deobfuscated crash stack traces
After you've uploaded a ProGuard mapping file or debug symbols file for a version of your app, crashes and ANRs that occur afterward will be deobfuscated. You can review deobfuscated stack traces for individual crashes and ANRs on your app's Crashes & ANRs page.
- Open Play Console.
- Select an app.
- On the left menu, select Monitor and improve > Android vitals > Crashes & ANRs.
- Select a crash.
- In the "Stack Traces" section, you'll see your deobfuscated and symbolicated stack traces.
Important: Once you've uploaded a mapping file for a version of your app, only future crashes and ANRs for that version of your app will be deobfuscated. Crashes and ANRs for a version of your app that happen before you've uploaded its respective mapping file won't be deobfuscated.