Skip to content

feat(android): Raise minSdk from 21 to 24 - #6518

Open
runningcode wants to merge 3 commits into
9.x.xfrom
no/min-sdk-24
Open

runningcode wants to merge 3 commits into
9.x.xfrom
no/min-sdk-24

Conversation

@runningcode

@runningcode runningcode commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (minSdk 24)


📜 Description

Raises minSdk for all Android modules from 21 to 24.

This raises it and then disables ObsoleteSdkInt. They are removed in the stacked PR.

The R8 bundled with AGP 9.0 and 9.2 crashes on androidx.core at minSdk 24, the same crash #6435 hit at 26. So the AGP matrix pins R8 to the version that ships with the default AGP.

💡 Motivation and Context

💚 How did you test it?

CI

📝 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

🤖 Generated with Claude Code

runningcode and others added 2 commits November 9, 2026 14:15
Raise the minimum supported Android API level of all Android modules
from 21 to 24. The SDK_INT checks this makes obsolete stay for now, so
lint's ObsoleteSdkInt check is disabled until they are removed.

The R8 bundled with AGP 9.0 and 9.2 crashes on androidx.core at the new
minSdk, so builds that override AGP run the R8 of the default AGP.

Resolves #5508
Resolves JAVA-547

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Nov 9, 2026

Copy link
Copy Markdown

JAVA-547

@github-actions

github-actions Bot commented Nov 9, 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 36aa094

@sentry

sentry Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

sentry-uitest-android lints with warningsAsErrors and is part of the
root build, so its two pre-24 checks fail check at minSdk 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
object BuildPlugins {
val androidGradle = "com.android.tools.build:gradle:$AGP"

// The R8 bundled with AGP 9.0 and 9.2 crashes on androidx.core at minSdk 24, so builds that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See discussion here for more info: https://github.com/getsentry/sentry-java/pull/6435/changes#diff-7ec293fa4699b0f55ddf8c807fa0e05b742fbeb35be17d9800e39a6211941e77R11

Basically this is only happening to us on old AGP versions. Upgrading them fixes it.

@runningcode
runningcode marked this pull request as ready for review November 9, 2026 13:49
@runningcode
runningcode requested review from a team and adinauer as code owners November 9, 2026 13:49
@runningcode
runningcode requested review from markushi and romtsn and removed request for a team November 9, 2026 13:49
@runningcode runningcode added sanity-check PR needs a lightweight review for obvious issues next-major This should only be merged in the next major version. labels Nov 9, 2026

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

next-major This should only be merged in the next major version. sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant