From bbcaa39496b6b1b73a0c65640b6a0a6e55c83eaa Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Fri, 30 Oct 2026 12:57:31 +0100 Subject: [PATCH 1/2] feat(android): Drop sentry-android-ndk from sentry-android sentry-android no longer pulls in sentry-android-ndk, and tombstone reporting is enabled by default, so native crashes on Android 12+ are still reported without the sentry-native runtime. Apps that need sentry-native, for example for Android < 12, add sentry-android-ndk themselves. The sample ships native code, so it adds it directly. Refs JAVA-300 Co-Authored-By: Claude Opus 5.5 --- .../java/io/sentry/android/core/SentryAndroidOptions.java | 4 ++-- .../java/io/sentry/android/core/ManifestMetadataReaderTest.kt | 2 +- sentry-android/build.gradle.kts | 1 - sentry-samples/sentry-samples-android/build.gradle.kts | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroidOptions.java b/sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroidOptions.java index b88bb6fdf7..e80d3b6485 100644 --- a/sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroidOptions.java +++ b/sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroidOptions.java @@ -309,7 +309,7 @@ public interface BeforeCaptureCallback { private @Nullable SentryFrameMetricsCollector frameMetricsCollector; - private boolean enableTombstone = false; + private boolean enableTombstone = true; /** * The maximum time difference, in milliseconds, between a tombstone from {@link @@ -463,7 +463,7 @@ public void setTombstoneEnabled(boolean enableTombstone) { /** * Checks if Tombstone reporting (ApplicationExitInfo.REASON_CRASH_NATIVE) is enabled or disabled - * Default is disabled + * Default is enabled * * @return true if enabled or false otherwise */ diff --git a/sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt b/sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt index 6684f8c617..7c52f8959a 100644 --- a/sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt +++ b/sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt @@ -436,7 +436,7 @@ class ManifestMetadataReaderTest { ManifestMetadataReader.applyMetadata(context, fixture.options, fixture.buildInfoProvider) // Assert - assertEquals(false, fixture.options.isTombstoneEnabled) + assertEquals(true, fixture.options.isTombstoneEnabled) } @Test diff --git a/sentry-android/build.gradle.kts b/sentry-android/build.gradle.kts index 4c493e9e2d..67c40b2f85 100644 --- a/sentry-android/build.gradle.kts +++ b/sentry-android/build.gradle.kts @@ -28,6 +28,5 @@ android { dependencies { api(projects.sentryAndroidCore) - api(projects.sentryAndroidNdk) api(projects.sentryAndroidReplay) } diff --git a/sentry-samples/sentry-samples-android/build.gradle.kts b/sentry-samples/sentry-samples-android/build.gradle.kts index a9d4ea8ac5..441271bc5e 100644 --- a/sentry-samples/sentry-samples-android/build.gradle.kts +++ b/sentry-samples/sentry-samples-android/build.gradle.kts @@ -178,6 +178,7 @@ dependencies { implementation(projects.sentryAndroid) implementation(projects.sentryAndroidFragment) + implementation(projects.sentryAndroidNdk) implementation(projects.sentryAndroidNavigation) implementation(projects.sentryAndroidNavigation3) implementation(projects.sentryAndroidSqlite) From bf8938bed023831139be5cd0d1eeb4ae95d3ebd4 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Fri, 30 Oct 2026 13:04:54 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1185d47aaf..67e153b795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ - Decide whether foregrounding the app starts a new session on a monotonic clock instead of the wall clock, so that a device time change no longer starts a session that should have been resumed, or resumes one that should have ended. This affects session counts ([#6096](https://github.com/getsentry/sentry-java/pull/6096)) - `SentryUserFeedbackForm` now extends `android.app.Dialog` instead of `android.app.AlertDialog` ([#6338](https://github.com/getsentry/sentry-java/pull/6338)) - The form never used `AlertDialog` features. Code that calls `AlertDialog`-only methods on it, such as `setButton` or `setMessage`, no longer compiles. +- `sentry-android` no longer includes `sentry-android-ndk`, and tombstone reporting is enabled by default, so native crashes on Android 12+ are still reported. Add `io.sentry:sentry-android-ndk` yourself if you need sentry-native, for example on Android 11 and lower ([#6436](https://github.com/getsentry/sentry-java/pull/6436)) ## 8.62.0