Skip to content

Commit 2127e30

Browse files
kahestmarkushi
andauthored
chore(Android): Add troubleshooting entry about Sentry.init (#11147)
* adds troubleshooting entry about Sentry.init * Apply suggestions from code review Co-authored-by: Markus Hintersteiner <[email protected]> --------- Co-authored-by: Markus Hintersteiner <[email protected]>
1 parent 8db35c9 commit 2127e30

File tree

1 file changed

+10
-0
lines changed
  • docs/platforms/android/troubleshooting

1 file changed

+10
-0
lines changed

docs/platforms/android/troubleshooting/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ description: "Troubleshoot and resolve common issues with the Android SDK."
44
sidebar_order: 9000
55
---
66

7+
## Obfuscated stack traces, missing Android-specific context
8+
9+
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`.
10+
11+
<Alert level="warning">
12+
For manual initialization on Android, <PlatformLink to="/configuration/manual-init/#manual-initialization">always use `SentryAndroid.init`</PlatformLink>.
13+
</Alert>
14+
15+
From SDK version `8.0.0` on, using `Sentry.init` on Android will throw an `IllegalArgumentException`.
16+
717
## Excluding Unwanted Resources from APK/AAB
818

919
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:

0 commit comments

Comments
 (0)