Showing full stacktraces

If you are using ProGuard, DexGuard, or R8 to minify and optimize your app this will cause method and class names to become obfuscated in your stacktraces. Similarly, for applications which use the NDK, native stacktraces from C or C++ code consist of a list of addresses and numeric offsets.

In order for your stacktraces to remain readable in your dashboard, BugSnag requires that you upload your obfuscation mapping file and the symbols from any native code for each release of your app. This page describes how to upload these files as part of your build process.

Using the BugSnag CLI

Our command line tool provides a toolbox of commands for uploading files and creating builds on your dashboard after your app has been built. This is particularly useful for integrating CI and non-Gradle systems.

The simplest approach is to use the upload android-aab command with an Android App Bundle (AAB) as it contains all the necessary files:

$ bugsnag-cli upload android-aab app/build/outputs/bundle/release/app-release.aab

Alternatively you can upload the Proguard/Dexguard/R8 mappings and NDK symbol files separately, pointing at the root of your project directory:

$ bugsnag-cli upload android-proguard /path/to/my-app
$ bugsnag-cli upload android-ndk /path/to/my-app

See the AAB, Proguard and NDK CLI command references for full details.

BugSnag Android Gradle plugin

The BugSnag Android Gradle plugin is installed in your Gradle configuration and will automatically upload the relevant mapping files when you build your app. See our Android Gradle Plugin docs to get started.

The BugSnag Android Gradle plugin supports AGP 4.x-8.x, however in future this tool will be replaced by the BugSnag Gradle plugin: a lighter-weight tool which wraps the CLI tool and has less of a dependency on AGP itself. This new plugin is compatible with AGP 8.x+ and is designed to work best with v6 of the BugSnag Android SDK, so we recommend using the BugSnag Gradle plugin now if you also have v6 of the SDK.

Manually uploading mapping files

If you prefer, you can upload your mapping files directly to BugSnag using our APIs. For ProGuard, DexGuard, and R8 mapping files see the Android Mapping Upload API reference for more details. For NDK shared object files see the NDK Symbol Upload API reference for more details.

Notes

Existing error events

Uploaded mappings will only be applied to new error events. Existing error events will not be deobfuscated/symbolicated retroactively.

ProGuard Settings

If you are using proguard-android-optimize.txt settings then BugSnag will convert the stack traces to a human-readable format, but the original file names might not be available.

If the stack traces provided to BugSnag do not contain a valid file, then we will use the unqualified class name in place of the file name.