Skip to content

Commit

Permalink
adds troubleshooting entry about Sentry.init
Browse files Browse the repository at this point in the history
  • Loading branch information
kahest committed Aug 26, 2024
1 parent 58ff6df commit d4b5a79
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/platforms/android/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 unobfuscated properly, even though <PlatformLink to="/enhance-errors/proguard/">mapping files are uploaded correctly</PlatformLink>, 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`.

<Alert level="warning">
For manual initialization on Android, <PlatformLink to="/configuration/manual-init/#manual-initialization">always use `SentryAndroid.init`</PlatformLink>.
</Alert>

From SDK version `8.0.0` on, using `Sentry.init` on Android will cause a compile-time exception.

## 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:
Expand Down

0 comments on commit d4b5a79

Please sign in to comment.