How to Update targetSdk to API 36 Without Breaking Your App
Android 16 targetSdk migration checklist: edge-to-edge inset fixes, predictive back, large-screen adaptability (600dp+), and Gradle build checks.
PlayLaunch Editorial Team
Fact-checked per PlayLaunch Editorial Policy
Table of Contents
- TL;DR
- 1. Upgrade Gradle Tooling & Bump SDK Configuration Safely
- Checklist Before First Release Compile
- 2. Fix Mandatory Edge-to-Edge Enforcement (Opt-Out Removed)
- Fix for Views / XML Layouts
- Fix for Jetpack Compose
- 3. Migrate Navigation to Predictive Back
- Recommended Migration
- 4. Prepare for Large-Screen Orientation & Resizability Overrides (sw ≥ 600dp)
- Quick Adaptive Safeguards
- 5. Check Typography (elegantTextHeight) & Fixed-Rate Work Scheduling
- Complete Target API 36 Migration Verification Table
- Want Engineers to Audit Your API 36 Release Before You Submit?
- Sources
TL;DR
With Google Play enforcing Android 16 (API level 36) across all new submissions and updates, knowing how to update target API level Android 16 without shipping clipped buttons or dead back gestures is essential. Unlike minor past SDK bumps, API 36 removes the Android 15 edge-to-edge opt-out, turns on predictive back by default, overrides orientation locks on screens ≥ 600dp, clamps missed fixed-rate jobs, and locks readable elegantTextHeight line heights. Walk through this engineering targetSdk migration checklist before building your .aab—or let PlayLaunch catch regressions upfront with our pre-submission app audit.
1. Upgrade Gradle Tooling & Bump SDK Configuration Safely
Start inside a dedicated migration branch so you can test release builds on an Android 16 (API 36) emulator and physical device before merging. First check Google Play's target API level timeline briefing and align Android Gradle Plugin (AGP), Kotlin, and cross-platform SDKs (Flutter, React Native/Expo) so your toolchain recognizes API 36 cleanly:
// app/build.gradle.kts
android {
namespace = "com.yourbrand.app"
compileSdk = 36
defaultConfig {
applicationId = "com.yourbrand.app"
minSdk = 24
targetSdk = 36
versionCode = 42
versionName = "2.4.0"
}
}
Checklist Before First Release Compile
- Review every dependency in
libs.versions.tomlorpackage.jsonfor Android 16 compatibility (camera, billing, biometric, WebView, and push libraries frequently release target-SDK patches). - Check
AndroidManifest.xmlfor explicitandroid:exportedflags on components with intent filters, declaredforegroundServiceTypeattributes, and updated Bluetooth/Media permissions if migrating up fromtargetSdk 33or34simultaneously. See our companion Android App Bundle & Play App Signing checklist for signing andarm64-v8averification.
2. Fix Mandatory Edge-to-Edge Enforcement (Opt-Out Removed)
In Android 15 (API 35), Google enforced edge-to-edge drawing by default, but offered teams a temporary escape hatch via android:windowOptOutEdgeToEdgeEnforcement="true" inside XML themes. When you target Android 16 (API level 36) on an Android 16 device, that attribute is deprecated and disabled.
Your app can no longer opt out—which means floating action buttons, bottom navigation tabs, fixed WhatsApp/CTA bars, and top headers will visually collide with system status and gesture bars unless handled cleanly.
Fix for Views / XML Layouts
- Search your
res/values/themes and delete every line containingwindowOptOutEdgeToEdgeEnforcement. - Call
enableEdgeToEdge()cleanly in your Activity beforesetContentView(...), and apply system-bar padding to root or edge containers usingViewCompat.setOnApplyWindowInsetsListener:
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main_container)) { view, insets ->
val bars = insets.getInsets(
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()
)
view.updatePadding(
left = bars.left,
top = bars.top,
right = bars.right,
bottom = bars.bottom
)
insets
}
}
Fix for Jetpack Compose
- Prefer Material 3
Scaffold,TopAppBar, andNavigationBar(which apply sensible default insets), or explicitly apply.safeDrawingPadding(),WindowInsets.systemBars, andWindowInsets.imePadding()on forms, bottom sheets, and scrollable screens (contentPadding). - Ensure background surfaces bleed behind translucent bars while interactive controls stay safely inside
WindowInsets.safeDrawing(including camera cutouts and rounded corners!).
3. Migrate Navigation to Predictive Back
For apps targeting API 36 and running on Android 16+, system predictive back animations (back-to-home, cross-activity, and cross-task) turn on by default. Just as critically:
- Legacy
Activity.onBackPressed()overrides are no longer called for system-handled back navigation. - Raw
KeyEvent.KEYCODE_BACKevents are no longer dispatched for back presses intercepted by the system.
If your app shows custom confirmation dialogs ("Discard unsaved form?"), handles multi-step onboarding wizards, or pops custom WebView history inside onBackPressed(), pressing back on Android 16 will unexpectedly throw users straight to the home launcher!
Recommended Migration
Move custom back handling to AndroidX OnBackPressedDispatcher (OnBackPressedCallback in Views, or BackHandler in Jetpack Compose / React Native / Flutter upgraded navigation hooks):
val unsavedCallback = object : OnBackPressedCallback(enabled = hasUnsavedChanges) {
override fun handleOnBackPressed() {
showDiscardChangesDialog()
}
}
onBackPressedDispatcher.addCallback(this, unsavedCallback)
Keep isEnabled updated reactively (unsavedCallback.isEnabled = ...) whenever your state changes rather than unconditionally intercepting back gestures—that preserves smooth OS peek-to-home animations whenever no modal/unsaved state is active.
If a massive legacy screen needs extra QA time before full callback refactoring, Google documents a temporary manifest opt-out attribute—remembering it is slated for obsolescence in future Android versions:
<activity
android:name=".LegacyCheckoutActivity"
android:enableOnBackInvokedCallback="false" />
4. Prepare for Large-Screen Orientation & Resizability Overrides (sw ≥ 600dp)
Under Android 16's adaptive layout push, apps targeting API 36 on displays with smallest width ≥ 600dp (tablets, unfolded foldables, ChromeOS/desktop windowing) have orientation, resizability, and aspect-ratio restrictions ignored by the platform:
- Manifest locks such as
android:screenOrientation="portrait"andandroid:resizeableActivity="false", plus runtime calls likesetRequestedOrientation(), no longer letterbox or freeze apps into a phone rectangle (android:appCategory="game"remains exempt). - Apps fill the full display window and can be freely resized in multi-window mode, meaning frequent configuration changes and activity recreation if UI state isn't preserved.
Quick Adaptive Safeguards
- Test using the App Compatibility Framework flag
UNIVERSAL_RESIZABLE_BY_DEFAULTon a tablet or foldable emulator. - Wrap form inputs, scroll offsets, and tab indices inside
ViewModel/rememberSaveable/ saved-instance state so window resizing never wipes user progress. - Clamp wide single-column forms cleanly (
widthIn(max = 640.dp)or centered tablet containers) so inputs and hero banners do not stretch awkwardly edge to edge across a 12-inch tablet.
Why Android 16 adaptive work pays off into 2027
Google Play already announced that April 2027 enforces Tier 3 adaptive quality alongside mandatory foldable screenshots, followed by API 37 in August 2027. Cleaning up layout responsiveness now saves double rework next year.
5. Check Typography (elegantTextHeight) & Fixed-Rate Work Scheduling
Two quieter API 36 changes catch Indian consumer apps and background-sync utilities off guard:
- Typography (
elegantTextHeight): Android 16 deprecates overridingelegantTextHeighttofalse, preserving the taller, more readable line spacing across non-Latin scripts including Tamil, Gujarati, Kannada, Malayalam, Odia, Telugu, Arabic, Lao, Myanmar, and Thai. Audit fixed-height buttons, compact badges, and single-line cards in localized Indian builds so ascenders/descenders do not clip. - Fixed-Rate Scheduling (
ScheduledThreadPoolExecutor.scheduleAtFixedRate): When an app resumes from outside a valid process lifecycle, Android 16 executes at most one missed periodic execution immediately rather than firing a backlog burst (STPE_SKIP_MULTIPLE_MISSED_PERIODIC_TASKS). Verify any background polling or sync timers don't assume missed catch-up loops will replay 1-by-1.
Complete Target API 36 Migration Verification Table
| Domain | Required Change for API 36 | How to Verify Before Play Upload |
|---|---|---|
| Gradle Build | compileSdk = 36, targetSdk = 36, updated AGP & plugins | Run ./gradlew bundleRelease cleanly with R8 enabled |
| System Bars | Remove windowOptOutEdgeToEdgeEnforcement; wire WindowInsets | Inspect top headers, keyboards (imePadding), and bottom nav on Android 16 emulator |
| Navigation | Replace onBackPressed() / KEYCODE_BACK with OnBackPressedCallback | Test WebView back, exit dialogs, and cross-activity gestures with Predictive Back enabled |
| Large Screens | Support rotation, resizing, and saved state on sw ≥ 600dp | Enable UNIVERSAL_RESIZABLE_BY_DEFAULT; rotate foldable & split-screen window |
| Typography & Tasks | Audit localized Indian scripts; test background scheduleAtFixedRate | Visual QA in Tamil/Telugu/Gujarati/Kannada locales + background/foreground cycle |
Want Engineers to Audit Your API 36 Release Before You Submit?
If migrating dependencies, edge-to-edge insets, or merged manifest permissions is holding back your launch, message PlayLaunch on WhatsApp for an under-30-minute scope review. We start with a thorough app audit, optimize your ASO assets, publish live via our established Play Console in 2–3 days*, and complete official ownership transfer to your account in under 48 hours*.
Book a Pre-Launch API 36 Audit on WhatsApp (+91 87896 01387)
*Timelines depend on app readiness and Google review times. PlayLaunch is an independent service and is not affiliated with Google LLC.
Sources
Frequently Asked Questions
What breaks most often when bumping targetSdk to 36 (Android 16)?
Three changes cause most regressions: disabling of windowOptOutEdgeToEdgeEnforcement (top and bottom toolbars overlap status/navigation bars), predictive back bypassing legacy onBackPressed() overrides, and large-screen overrides ignoring fixed portrait orientation locks on displays with smallest width ≥ 600dp.
Can I still opt out of edge-to-edge on Android 16 when targeting API 36?
No. R.attr#windowOptOutEdgeToEdgeEnforcement is deprecated and disabled on Android 16 devices for apps targeting API level 36. You must remove the attribute and apply proper WindowInsets padding in Jetpack Compose or ViewCompat.setOnApplyWindowInsetsListener in Views.
How can I handle legacy onBackPressed code quickly while upgrading to targetSdk 36?
The long-term fix is migrating back handlers to AndroidX OnBackPressedDispatcher / OnBackPressedCallback or platform OnBackInvokedCallback. For short-term stability while migrating complex screens, Android 16 allows temporarily setting android:enableOnBackInvokedCallback="false" on <application> or specific <activity> elements.
Does updating targetSdk to 36 affect Indian regional script typography?
Yes. Android 16 deprecates and disables overriding the elegantTextHeight TextView attribute (keeping readable line spacing enabled), affecting scripts such as Tamil, Gujarati, Kannada, Malayalam, Odia, Telugu, Arabic, and Thai—test vertically constrained labels carefully.
Sources & Official Documentation
Ready to launch on Google Play without guesswork?
PlayLaunch audits your Android build, prepares ASO store assets, publishes live via our established Play Console in 2–3 days*, and transfers complete ownership to your account in under 48 hours*.
* Timelines depend on app readiness and Google review times.
PlayLaunch Editorial Team
Android publishing specialists helping founders, freelancers, and agencies pass Play policy checks, boost ASO conversion, and transfer console ownership cleanly.
Related PlayLaunch Guides
Google Play Now Requires Android 16 (API 36): What It Means for You
Both August 31 and November 1, 2026 Google Play target API level requirement deadlines for Android 16 (API 36) have arrived. Learn what blocks uploads now.
Google Play Data Safety Form: Section-by-Section Guide
Google Play data safety form walkthrough: collection vs sharing, SDK audits, security and account deletion links, and all 14 user data type sections.
Google Play Policy Updates: What Developers Need to Know This Month
December 2026 Google Play policy update briefing: Jan 2027 permission deadlines, Android developer verification expansion, and foldable screenshot rollout.