Skip to content

enh(android): Lower Android minSdk to 24 - #4150

Merged
buenaflor merged 3 commits into
mainfrom
build/android-minsdk-24
Nov 11, 2026
Merged

buenaflor merged 3 commits into
mainfrom
build/android-minsdk-24

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Lowers the sentry_flutter Android minSdkVersion from 26 to 24. The example, microbenchmarks, and min_version_test apps go back to flutter.minSdkVersion, as they were before #4049.

💡 Motivation and Context

v10 raised the minimum to 26 (#4049). Flutter 3.44, our minimum supported version, defaults flutter.minSdkVersion to 24. That means an app using Flutter's default fails the Android manifest merge with v10 until the developer raises minSdk by hand.

This change is not breaking: apps already on minSdk 26 or higher are unaffected. We checked the following for code that needs API 26:

  • Kotlin plugin: it only uses older Android and Java APIs. The one newer call (activity.display, API 30) already has an SDK_INT check.
  • JNI bindings: they only call Context, Bitmap.createBitmap(w, h, ARGB_8888), Bitmap.copyPixelsFromBuffer, and java.net.Proxy. All of these work below API 26.
  • Dependencies: sentry-android 8.63.0 and package:jni both declare minSdk 21.
  • Session Replay: ReplayIntegration.register() exits early below API 26, and start, buffering, and screenshot calls check that it is enabled. On API 24 and 25, Replay, including the new manual controls, does nothing instead of crashing.

Changelog Entry

  • Lower the minimum Android SDK version for Flutter from API 26 to API 24, matching Flutter's default minSdk.

💚 How did you test it?

I only reviewed the code. I didn't run an app on a device. Before merging, run min_version_test CI and a quick smoke test on an API 24 emulator: init, capture an event, a native crash, and check that Replay stays off.

via Gino Buenaflor.

--

View Session [Sentry]

Align the plugin's minSdk with Flutter 3.44's default
flutter.minSdkVersion (24) so apps using the Flutter default
build without raising minSdk. Nothing in the plugin, the JNI
bindings, or sentry-android 8.63.0 requires API 26; Session
Replay already disables itself below API 26.

Co-Authored-By: Gino Buenaflor <[email protected]>
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Fixes

  • (flutter) Fetch sentry-native as a release zip on Windows by lucas-zimerman and claude in #4110
  • (link) Set span attributes on creation by awishere, codex and buenaflor in #4044
  • (replay) Mask correctly during zoom page transitions by lucas-zimerman, claude and buenaflor in #4130

Enhancements

  • Lower the minimum Android SDK version for Flutter from API 26 to API 24, matching Flutter's default minSdk. by buenaflor and lucas-zimerman with sentry-junior in #4150

Dependencies

Deps

  • chore(deps): update Cocoa SDK to v9.33.0 by buenaflor with github-actions in #4143
  • chore(deps): update Native SDK to v0.17.6 by buenaflor with github-actions in #4144
  • chore(deps): update Android SDK to v8.63.0 by github-actions in #4147

Internal Changes

Release

  • Bump getsentry/craft release tooling to 3.9.0 (CI only) by BYK with sentry-junior in #4140
  • via @BYK. by BYK with sentry-junior in #4140
  • -- by BYK with sentry-junior in #4140
  • View Session in Sentry by BYK with sentry-junior in #4140

Other

  • (warden) Enable incremental review by Jeffreyhung with sentry-junior in #4145
  • Ask Junior to recheck native SDK bumps by buenaflor with sentry-junior in #4149
  • Expand platform and tooling ignore rules by philprime in #4148
  • Point Sentry Conventions links to conventions.sentry.dev by cleptric and claude in #4146

🤖 This preview updates automatically when you update the PR.

@sentry-junior sentry-junior Bot changed the title build(android): Lower Android minSdk to 24 enh(android): Lower Android minSdk to 24 Nov 10, 2026
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.12%. Comparing base (312756c) to head (ee477e5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4150      +/-   ##
==========================================
+ Coverage   89.11%   93.12%   +4.00%     
==========================================
  Files         354      119     -235     
  Lines       12795     4812    -7983     
==========================================
- Hits        11402     4481    -6921     
+ Misses       1393      331    -1062     
Flag Coverage Δ
sentry ?
sentry_dio ?
sentry_drift ?
sentry_file ?
sentry_firebase_remote_config 100.00% <ø> (ø)
sentry_flutter 92.86% <ø> (-0.03%) ⬇️
sentry_grpc ?
sentry_hive ?
sentry_isar ?
sentry_link ?
sentry_logging ?
sentry_sqflite ?
sentry_supabase 97.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Comment thread packages/flutter/android/build.gradle Resolved
@buenaflor
buenaflor marked this pull request as ready for review November 11, 2026 12:56
Copilot AI balanced review requested due to automatic review settings November 11, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Restoring Android API 24–25 support crosses JNI/native boundaries without device runtime validation, while Android-team agreement on the lowered baseline remains unresolved.

No open issues 🎉

What changed in this PR

Lowers the Flutter SDK’s Android minimum from API 26 to API 24, aligning with Flutter 3.44’s default and avoiding manifest-merge failures for apps using that default.

Changes:

  • Sets sentry_flutter’s Android minSdkVersion to 24.
  • Restores flutter.minSdkVersion in the example, microbenchmark, and minimum-version test apps.

Runtime validation on API 24 remains pending, as noted in the PR description.

File Description
packages/​flutter/​microbenchmarks/​android/​app/​build.gradle Uses Flutter’s default minimum Android SDK.
packages/​flutter/​example/​android/​app/​build.gradle Uses Flutter’s default minimum Android SDK.
packages/​flutter/​android/​build.gradle Lowers the plugin’s minimum Android SDK to 24.
min_version_test/​android/​app/​build.gradle Uses Flutter’s default minimum for compatibility builds.

Review effort: Balanced

@buenaflor
buenaflor merged commit e04bc17 into main Nov 11, 2026
77 checks passed
@buenaflor
buenaflor deleted the build/android-minsdk-24 branch November 11, 2026 13:32
antonis added a commit to getsentry/sentry-docs that referenced this pull request Nov 18, 2026
<!-- Keep the urgency section so automation can prioritize this PR. You
may delete other sections you don't need. -->

## DESCRIBE YOUR PR

`sentry_flutter` 10.4.0 lowered the minimum Android SDK version from API
26 to API 24, matching Flutter's default `minSdk`
(getsentry/sentry-dart#4150). The docs still say API 26 in three places,
which tells users (and coding agents) to raise `minSdk` when they don't
need to.

Changes:
- `includes/migration/flutter-v10/minimum-versions.mdx`: v10 minimum is
now `24`, with a note that 10.0.0–10.3.x require API 26.
- `includes/flutter-v10-migration-overview.mdx`: same correction in the
overview.
- `platform-includes/getting-started-prerequisites/dart.flutter.mdx`:
getting started prerequisites now say API 24.

**Verified:** `sentry_flutter` 10.5.0's `android/build.gradle` declares
`minSdkVersion 24`. A fresh Flutter 3.44.1 app (default `minSdk` 24)
with `sentry_flutter` ^10.5.0 built, ran on an Android emulator and sent
events to Sentry.

**How we found it:** coding agents following the docs via `sentry init`
raised `minSdk` to 26 in 6/6 runs, while the wizard's setup at API 24
worked fine. Context: getsentry/sentry-react-native#7064.

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
supplied a deadline.

## PRE-MERGE CHECKLIST

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
sfanahata pushed a commit to getsentry/sentry-docs that referenced this pull request Nov 23, 2026
## DESCRIBE YOUR PR

The v10 migration guide's package example changes from `sentry_flutter:
^10.0.0` to `^10.4.0`.

#20882 already lowered the documented Android minimum to API 24, and it
notes that 10.0.0 to 10.3.x still need API 26. The `^10.0.0` example
still accepts those releases, so someone who follows the guide on API 24
or 25 can resolve to a version that fails the Android manifest merge.
[getsentry/sentry-dart#4150](getsentry/sentry-dart#4150)
shipped in 10.4.0.

This PR first changed the prerequisites, migration overview, and
minimum-versions table from 26 to 24. #20882 made the same changes with
release qualifiers, so when I resolved the merge conflict I kept
master's version. Only the package example change is left.

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## PRE-MERGE CHECKLIST

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

<!-- junior-request-attribution:start -->
via **Gino Buenaflor**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AD0AND00ESR2%3A1794322085.249379 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AD0AND00ESR2%3A1794322085.249379)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0AND00ESR2%3A1794322085.249379/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Gino Buenaflor <[email protected]>
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.

3 participants