Skip to content

feat(android): Drop sentry-android-ndk from sentry-android - #6436

Open
runningcode wants to merge 2 commits into
9.x.xfrom
no/drop-ndk-from-sentry-android
Open

runningcode wants to merge 2 commits into
9.x.xfrom
no/drop-ndk-from-sentry-android

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

📜 Description

  • sentry-android no longer depends on sentry-android-ndk. Apps that want native crash reporting through sentry-native (for example, to cover Android < 12 or to get native scope sync) add io.sentry:sentry-android-ndk themselves.
  • Tombstone reporting (ApplicationExitInfo.REASON_CRASH_NATIVE) is now enabled by default. Native crashes are still reported on Android 12+ without the NDK module.
  • The Android sample now depends on sentry-android-ndk directly, because it ships native code and exercises the NDK integration.

SdkInitTests in the UI tests already handles NdkIntegration being absent, so the UI test app runs without the NDK from now on. test-app-size will show the size drop.

💡 Motivation and Context

Most apps don't need the sentry-native runtime anymore now that tombstones are captured from ApplicationExitInfo. Dropping it from the default artifact cuts the native libraries and the startup cost of loading sentry-native for everyone who doesn't need it.

💚 How did you test it?

  • Unit tests for sentry-android-core and sentry-android-ndk
  • assembleDebug of the Android sample and the UI test app

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

  • Docs: mention that sentry-android-ndk is mostly useful for apps with their own native libraries or for Android < 12
  • Check with the hybrid SDKs (React Native, Flutter, Unity, .NET MAUI) that they add sentry-android-ndk explicitly

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 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown

JAVA-300

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against bf8938b

@sentry

sentry Bot commented Oct 30, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode marked this pull request as ready for review October 30, 2026 14:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant