My app calls enableEdgeToEdge() on the first line of onCreate, handles insets on every screen, and Play Console still told me « Edge-to-edge may not display for all users — call enableEdgeToEdge()« . The call was there. It just was not in the DEX anymore.
TL;DR — Play Console’s edge-to-edge checks are a static scan of the uploaded DEX. R8 in full mode inlines androidx.activity.EdgeToEdge.enable into your onCreate and renames the class, so the scan cannot find the API it recommends. -keep class androidx.activity.EdgeToEdge { public static void enable(...); } restores the symbol. The sibling warning about deprecated Window.setStatusBarColor is partly yours (theme attributes) and partly inside the library itself, on every API branch including 35.
The setup
A single-activity Android game written in Kotlin and Jetpack Compose. targetSdk is 36, minSdk 24. The activity opts into edge-to-edge with the AndroidX helper, and each screen pads itself with systemBarsPadding() or WindowInsets.safeDrawing:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
setContent { AppRoot() }
}
}
The release build runs R8 with isMinifyEnabled = true, the default proguard-android-optimize.txt, and full mode (the AGP default since 8.0). After uploading the bundle, the Play Console « App quality » page listed two warnings for the release:
- Edge-to-edge may not display for all users — « call
enableEdgeToEdge()for backward compatibility ». - Your app uses deprecated APIs or parameters for edge-to-edge —
android.view.Window.setStatusBarColor,setNavigationBarColor, and the theme attributesandroid:statusBarColor/android:navigationBarColor.
What I expected
The first warning reads like a lint check on source: « you did not call the API ». I had called it, on line one, on the only activity. I expected the warning to be about something else — an opt-out attribute in the theme, or a second activity from a library.
What actually happens
The check does not read source. It reads the DEX inside the bundle, and it looks for references to known methods. Framework methods such as android.view.Window.setStatusBarColor are always visible: R8 cannot rename what lives in android.jar. AndroidX methods are ordinary library code, and R8 does what it is paid for:
enableEdgeToEdgeis a top-level Kotlin function in a file annotated@file:JvmName("EdgeToEdge"), so it compiles to a small static methodandroidx.activity.EdgeToEdge.enable(...).- In full mode, R8 inlines that small method into
onCreate, or at the very least renames the class to something likea.b. Either way the nameandroidx.activity.EdgeToEdgeis gone from the DEX.
Look for the symbol in the bundle of the flagged release and it is not there:
DEX=app/build/intermediates/dex/release/minifyReleaseWithR8/classes.dex
strings $DEX | grep -c 'androidx/activity/EdgeToEdge' # 0 — the AndroidX symbol is gone
strings $DEX | grep -c 'setStatusBarColor' # 1 — the framework call is still there
So the scan sees Window.setStatusBarColor (the deprecated call the library makes internally) but never sees EdgeToEdge.enable, and reports the two things it can honestly report: « you use a deprecated API » and « we did not find the recommended call ».

The fix
One rule in proguard-rules.pro. It pins the class name and the method, which also stops R8 from inlining it — a plain -keep without allowoptimization makes the method ineligible for inlining:
# Play Console scans the DEX for androidx.activity.EdgeToEdge.enable.
# R8 full mode inlines and renames it; keep the symbol so the scan can see it.
-keep class androidx.activity.EdgeToEdge {
public static void enable(...);
}
Rebuild and check again:
./gradlew bundleRelease
unzip -p app/build/outputs/bundle/release/app-release.aab base/dex/classes.dex \
| strings | grep 'androidx/activity/EdgeToEdge'
# Landroidx/activity/EdgeToEdge;
The rest of the library stays optimized: the R8 metadata in the bundle (BUNDLE-METADATA/com.android.tools/r8.json) still reports about 97 % of methods optimized and 98 % obfuscated, the same as before the rule.
For the second warning, remove what is yours. In my case the theme declared opaque bar colours, which are deprecated attributes in Android 15:
<!-- before -->
<style name="Theme.App" parent="android:Theme.Material.NoActionBar">
<item name="android:windowBackground">#1A1026</item>
<item name="android:statusBarColor">#1A1026</item>
<item name="android:navigationBarColor">#1A1026</item>
</style>
<!-- after: the bars are transparent and enableEdgeToEdge decides their look -->
<style name="Theme.App" parent="android:Theme.Material.NoActionBar">
<item name="android:windowBackground">#1A1026</item>
</style>
and pass explicit styles so the icon colour no longer follows the system’s light/dark mode on a game that is always dark:
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
navigationBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
)
aapt2 dump resources on the new APK finds zero occurrences of statusBarColor.
Why it works
Play’s check has to work on every bundle, including ones built with tools that never produce readable source, so it inspects method references in the DEX. That design has a blind spot: any AndroidX API is subject to shrinking, so a « did you call X » check only works if X survives R8 by name. The keep rule turns EdgeToEdge.enable back into a named entry point, which is exactly what the scan is matching on.
The deprecated-API half of the story is not fixable from an app, and it is worth knowing before spending an afternoon on it. EdgeToEdge.kt in androidx.activity sets window.statusBarColor and window.navigationBarColor on every API branch — EdgeToEdgeApi23, Api26, Api29, and EdgeToEdgeApi35, each under @Suppress("DEPRECATION"). I read the file on the androidx-main branch of the AndroidX repository the day this was written; the API 35 branch sets both colours to Color.TRANSPARENT through the deprecated setters before installing its own inset protections. That branch is ahead of the current 1.13.0 release, so upgrading the library from 1.9.3 does not remove those calls. What you can remove are the theme attributes and any window.statusBarColor = of your own.
A related trap on the same toolchain: Compose 1.12 forces AGP 9, and AGP 9 breaks kotlin-android.
What I did not test
- Whether Play Console actually clears the « may not display for all users » warning on the next upload. The bundle with the keep rule was built and inspected, not yet uploaded, when this was written. The claim here is about what the DEX contains, which is what the console reads.
- Whether
-keepnamesor-keep,allowobfuscationwould be enough. I used the full-keepon the method, which both preserves the name and blocks inlining, and did not try weaker variants. - Only one app, AGP 8.13.2, R8 8.13.19,
androidx.activity1.9.3. Older R8 versions may not inline that method. - Whether the deprecated-API warning disappears once only the library’s internal calls remain. Given the source, I expect it to stay; I have not seen the console’s verdict.
Facts
context: Android app with R8 full mode calling enableEdgeToEdge(), flagged by Play Console
problem: Play's DEX scan cannot find androidx.activity.EdgeToEdge.enable because R8 inlines and renames it
solution: -keep class androidx.activity.EdgeToEdge { public static void enable(...); } in proguard-rules.pro; remove android:statusBarColor/navigationBarColor from the theme
verified_on: 2026-08-27
applies_to: [AGP 8.13.2, R8 8.13.19, androidx.activity 1.9.3, targetSdk 36]
does_not_apply_to: [builds without minification, the deprecated Window.setStatusBarColor call inside androidx.activity itself]