diff --git a/docs/platforms/android/troubleshooting/index.mdx b/docs/platforms/android/troubleshooting/index.mdx index d33435f660d4b2..d20413e62ff4ac 100644 --- a/docs/platforms/android/troubleshooting/index.mdx +++ b/docs/platforms/android/troubleshooting/index.mdx @@ -4,6 +4,16 @@ description: "Troubleshoot and resolve common issues with the Android SDK." sidebar_order: 9000 --- +## Obfuscated stack traces, missing Android-specific context + +If stack traces don't get deobfuscated properly, even though mapping files are uploaded correctly, or if Android context information is missing from events, a possible reason is that the SDK is initialized with `Sentry.init` instead of `SentryAndroid.init`. + + +For manual initialization on Android, always use `SentryAndroid.init`. + + +From SDK version `8.0.0` on, using `Sentry.init` on Android will throw an `IllegalArgumentException`. + ## Excluding Unwanted Resources from APK/AAB The Sentry Android SDK bundles some resources transitively from the Sentry Java SDK that are not required for Android apps. It's not possible to exclude these resources when publishing the SDK, but you can add the following snippet to your `app/build.gradle` file to reduce the final APK size by a bit: