Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Android): Add troubleshooting entry about Sentry.init #11147

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 deobfuscated 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 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:
Expand Down
Loading