skip to content

As the lead of an Android app still on minSdk 21, how do you decide whether to raise it, and what does raising it cost and unlock?

level: principalimportance: should knowfreq 36%

answer

  1. libraries set the floor too
  2. who you stop updating
  3. fewer version checks and test devices
  4. decide with your own install data

basics

~20 s

Raise minSdk when the users you would stop updating are worth less than the cost of carrying them: Jetpack libraries now require API 23 or 24, and every old level adds version checks, compatibility code and test devices.

solid answer

~50 s

Two forces push the floor up. Libraries: Compose and Lifecycle moved their default minSdk from 21 to 23, Room 2.8.0 needs 23 and WorkManager 2.12.0 needs 24, and an app's `minSdk` must be at least each library's, so staying on 21 freezes those updates. Cost of carrying: every level below the floor means `SDK_INT` branches, compatibility code and devices in the test matrix. Against that, raising it means devices below the new level can no longer install or update the app; current users keep the last version they have, and Google Play hides the app from new users on those devices. Decide with your own install and revenue share per API level, then set a written rule, such as following the library floors with a release's notice, and own the old version you leave behind.

go deeper

for a junior

Know that minSdk is the oldest Android version that can install the app and that raising it drops devices.

for a middle

Explain why a library's minSdk forces the app's floor and what version checks and desugaring cost below it.

for a senior

Show how you would stage a floor bump: last stable release on the old floor, backend compatibility, and a test matrix that shrinks with it.

for a principal

Defend a written minSdk policy with your own install and revenue data, the library updates it unblocks, and the old clients the backend must still serve.

## What minSdk actually decides `minSdk` is the lowest Android API level that can install the app. The build writes it into the merged manifest, the system refuses installation below it, and Google Play does not offer the app on those devices. Raising it is therefore a product decision with engineering consequences, not a build tweak, and it is one a lead owns. ## The forces that push the floor up - **Library floors.** Jetpack has been leaving API 21 behind: Compose runtime and Lifecycle moved their default `minSdk` from 21 to 23, Room 2.8.0 raised its Android `minSdk` from 21 to 23, and WorkManager went to 23 in 2.11 and to 24 in 2.12.0 (September 2026). An app's `minSdk` must be equal to or greater than each library's, so the manifest merge fails the build until you raise it. A merge override exists, but it moves the failure from build time to a crash on old devices. - **Code you carry.** Each level below the floor needs `if (Build.VERSION.SDK_INT >= ...)` branches, AndroidX compatibility paths, or core library desugaring for newer Java APIs such as `java.time`, which ships natively from API 26. - **Test cost.** Every supported level is another emulator image or device in the matrix, and another class of bug your QA must still look for. ## What raising it costs | Cost | Who pays | |---|---| | Devices below the new floor cannot install or update the app | Users on old phones, and the revenue they bring | | Those users stay on the last compatible version | Your backend, which must keep serving that client's API | | Support and store questions from users who stop getting updates | Support and product | The second row is the one teams forget: an old client does not disappear, so the server keeps its contract with that version until the users leave or you block it deliberately. ## What it unlocks - Library updates that fix bugs and security issues, instead of pinning old versions. - Deleting compatibility code and version branches, which shortens review and lowers the crash surface. - A smaller test matrix and faster CI. - Platform APIs you can call directly instead of through wrappers. ## How to decide 1. **Measure your own users.** Use your install base by API level and its share of revenue and engagement, not the global distribution chart; Android Studio's New project wizard shows the global chart for context only. 2. **List what the floor blocks.** Which library updates and features are waiting on it, and what carrying the old levels costs per release. 3. **Compare.** If a few percent of active installs bring little revenue and block several library updates, the floor should move; if an old-device market is the business, it should not, and the team accepts the pinned versions. 4. **Announce and stage it.** Ship one last release on the old floor that is stable, communicate the change, and keep the backend serving that version for a defined period. 5. **Write the policy down.** For example: follow the highest `minSdk` among core Jetpack libraries within one release, reviewed every year when `targetSdk` moves. ## A worked example Suppose the app's own data shows that devices on API 21 to 23 are 1.5% of monthly active installs and 0.4% of revenue, and that the floor blocks the current WorkManager, Room and Compose releases. Carrying the floor means pinning three libraries, keeping their known bugs, and testing on three extra API levels every release. Moving to 24 drops a small, low-value group that keeps a working version, and the backend keeps serving that version until its traffic fades. On those numbers a lead moves the floor, says so a release in advance, and records the reason; if the same 1.5% were a region the business is entering, the answer would flip. ## What does not change - `minSdk` is independent of `targetSdk`: raising the floor opts the app into no new runtime behaviour. - It does not satisfy Google Play's target API requirement; that floor applies to `targetSdk`, not `minSdk`. The judgment is not "how low can we go" but "which users we serve at what cost", and a lead should be able to defend the number with data.

  • An app at minSdk 21 adds WorkManager 2.12.0; what happens at build time?
    The manifest merge fails, because the library's `minSdk` of 24 is higher than the app's 21 and an app's `minSdk` must be at least each library's. You either raise the app's `minSdk` or pin WorkManager to an older release. Forcing the merge with an override builds, but the library can then crash on devices below 24.
  • What happens to users on API 21 to 23 phones when the app moves to minSdk 24?
    They keep the version already installed but receive no further updates, and Google Play no longer offers the app to new users on those devices. The backend still sees those old clients, so it has to keep serving that version's API until usage drops or you deliberately retire it.

  • Raising minSdk changes the app's runtime behaviour like a targetSdk bump
  • Users below the new floor get the app uninstalled automatically
  • Global version share is enough data to choose the floor
  • A library with a higher minSdk just falls back on older devices

Library floors as of Room 2.8.0 and WorkManager 2.12.0 (minSdk 23 and 24); later releases may raise them again.