Repository navigation
feat(android): Raise minSdk from 21 to 24 - #6518
Open
runningcode wants to merge 3 commits into
Open
runningcode wants to merge 3 commits into
runningcode wants to merge 3 commits into
Conversation
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>
This was referenced Nov 9, 2026
Contributor
|
📲 Install BuildsAndroid
|
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>
3 of 9 tasks
runningcode
commented
Nov 9, 2026
| 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 |
Contributor
Author
There was a problem hiding this comment.
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
marked this pull request as ready for review
November 9, 2026 13:49
runningcode
requested review from
markushi and
romtsn
and removed request for
a team
November 9, 2026 13:49
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (minSdk 24)
📜 Description
Raises
minSdkfor 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
sendDefaultPIIis enabled.🔮 Next steps
SDK_INTchecks made obsolete by this change and turnObsoleteSdkIntback on (ref(android): Remove code made obsolete by minSdk 24 #6519)🤖 Generated with Claude Code