On this page · 9 sections
Summary. From February 2027 Google Play will require apps with more than 10 MB of DEX code, and games with more than 50 MB, to reach at least 25% on each of three measures: shrinking, optimisation and obfuscation. Play Console already shows these percentages for each app bundle you upload, and Google says apps that miss the thresholds may lose visibility and publishing capabilities. The catch for app teams is that the score is not theirs alone. On 17 November 2026 Google published guidance for library and SDK makers, pointing out that the DEX figures in Play Console combine the app's own keep rules with the consumer keep rules bundled inside its libraries. One broad rule in one library can hold back the whole app. Tinder traced such a rule to an in-house library; after it was narrowed, its R8 scores rose from 28% to 50% and its download size fell from 86.6 MB to 61.5 MB. Our verdict: app teams should run the R8 Configuration Analyzer now, and SDK makers should ship entry-point or conditional rules before February.
About this article. This is for Android leads, SDK and library maintainers, and engineering managers who ship apps or SDKs on Google Play. On 2 December 2026 we checked the thresholds, dates, commands and versions here against Google's Play Console Help, the Android Developers documentation, the Android Gradle plugin release notes and the Android Developers Blog. We did not benchmark any SDK. This is technical guidance, not legal advice; Google says the thresholds may change, and no vendor paid for inclusion. Researched with AI assistance and checked against the primary sources listed in the references.
What Google Play will check from February 2027
Google announced the requirement on 26 August 2026, alongside memory thresholds that also start in February 2027 and a zero-tap sign-in rule that starts in April 2027. The DEX part is short:
| Measure | Apps (over 10 MB of DEX) | Games (over 50 MB of DEX) |
|---|---|---|
| Shrinking | at least 25% | at least 25% |
| Optimisation | at least 25% | at least 25% |
| Obfuscation | at least 25% | at least 25% |
| Form factors | all | all |
The table follows the Play Console Help page on technical quality requirements. Four details matter when you plan the work:
- Size gates apply. Google enforces the rule only where DEX size is non-negligible, hence the 10 MB floor for apps and 50 MB for games.
- Any tool counts. Google recommends R8, but another shrinker that reaches 25% on all three measures also meets the rule.
- Your Play category decides. Play treats you as an app or a game based on the category in your store settings. Google warns that picking an inaccurate category to get a different threshold breaks its Metadata policy.
- CI builds can differ. A local build may not match what a CI/CD or enterprise pipeline uploads, so expect minor differences between your laptop and Play Console.
On 2 December 2026 the Help page still lists this as an upcoming requirement that is not yet mandated. It also says the listed requirements are not optional. Google has named the month but not the day, and the August announcement promised more detail later in the year. Treat the numbers as fixed for planning and recheck the Help page before each release.
Our guides to the Android 17 memory limiter and the OEM rollout of app memory limits cover the platform's own memory caps. R8 helps there too, because it reduces memory usage.
Why an SDK's rules count against your app
R8 removes unused code, optimises what remains and shortens names, but only within the limits its keep rules allow. Those rules come from three places: your app, the Android Gradle plugin (AGP) defaults, and the consumer keep rules packaged inside the AARs and JARs you depend on. Consumer rules are applied automatically when an app that uses the library is optimised.
Keep rules are additive. You cannot cancel a library's rule by writing a narrower one of your own, and it can affect code elsewhere in your app. So when an SDK ships the rule below, every class and member in that package tree is kept, with its original name and without optimisation, in every app that uses the SDK.
# Package-wide: keeps every class and member under the package
-keep class com.example.sdk.** { *; }
Google's November post names a common variant: a third-party SDK that ships a wildcard keep over the whole com.google.android.gms namespace. If the app uses another Google Play services library and tries to keep less of it, the SDK's broad rule wins. It also swallows the narrower consumer rules that those Google libraries already ship.
Tinder's rule was broader still. Its in-house library kept every public class in the app, along with all public and protected members, whatever the package.
Google's guidance is now firm: libraries must not include package-wide keep rules for their own code or for their dependencies, and must never use global options such as -dontobfuscate or -allowaccessmodification.
Find the culprit: three tools
R8 Configuration Analyzer, for app teams
The tool reports shrinking, optimisation and obfuscation scores, the percentages Google says are at the core of Play's requirement. For each keep rule, including those that arrive from libraries, it shows the share of classes, fields and methods that R8 cannot optimise. It needs AGP 9.3.0 or R8 9.3.7-dev or later. The current plugin is AGP 9.5, from October 2026.
From AGP 9.3 you can run it as a standalone task, which skips building the APK or bundle:
./gradlew :app:analyzeReleaseR8Config
The HTML report lands at app/build/reports/r8/r8-config-analyzer-release.html. A full R8 release build such as assembleRelease also writes one to build/outputs/mapping/release/configanalyzer.html, unless you set android.experimental.r8.enableR8ConfigurationAnalyzer=false. On AGP 9.2 and earlier, Google documents adding a newer R8 as a classpath dependency in the settings file and passing a system property to write the report.
We suggest reading the report in this order:
- The three scores. Each is the percentage of classes, fields and methods open to that kind of R8 work.
- The rules that block most. Start with the keep rule that prevents optimisation in the largest share of the codebase.
- The source file of each rule. This helps you separate your own rules, a library's rules and the AGP defaults. Google says to leave the AGP defaults alone.
- Subsumed, unused and identical rules. The report flags broad rules that cover narrower ones, rules that match nothing, and duplicates.
There is also an agent skill: android skills add r8-analyzer installs it through the Android CLI. Google says it summarises the scores and highlights the five keep rules with the most impact.
Play Console, for what you actually shipped
For each app bundle you upload, the app bundle explorer in Play Console shows the DEX size and the optimisation percentages. The detailed insights depend on your shrinking tool sharing its optimisation metadata. Android vitals is also due to alert you to limited DEX optimisation. Compare these figures with your local report after every release, because Play judges the bundle you upload.
Android CLI, for library makers
The Android CLI analyze command reads AAB, APK, AAR and JAR files. For an app it reports the AGP version, the uncompressed DEX size and the R8 settings and percentages. For a library it reports D8 and R8 DEX sizes, kept against total classes, methods and fields, used and unused package-wide keep rules with their impact, blocked consumer keep rules, and warnings for known antipatterns.
android analyze --analysis=optimization -f json mylibrary.aar
Google suggests comparing the kept counts across releases to catch regressions. Because the JSON output is meant for scripts and CI pipelines, you can store it per release and fail a build when the kept count jumps.
A fix plan for app teams
First check that R8 is doing its full job. Remove android.enableR8.fullMode=false from gradle.properties if it is there, and confirm optimisation is on for the release build.
You cannot edit a library's bundled rules, but you can measure them and push for a fix. Google recommends this sequence:
- Update the flagged library. A newer version may already ship narrower rules. Rerun the tool after the update.
- Measure the gain locally. Copy the library's consumer rules into your own rules file, filter out the bundled ones, narrow your copy, and compare the three scores before and after.
- Report it. File a bug with the maintainer using the report's numbers, such as how many unreferenced classes a wildcard rule keeps. Look for an existing issue first.
The filter is a Gradle setting. With AGP 8.4 and higher:
buildTypes {
release {
optimization.keepRules {
it.ignoreFrom("com.somelibrary:somelibrary")
}
}
}
Google's caution is clear: filter in local builds to test, not in production releases. If a later version of the library adds reflection or JNI calls that your copied rules miss, the app can crash in production. If you ship a filter anyway, pin the library version and give the rule an owner and a review date.
Games need a separate check. Unity and Unreal manage R8 configuration and plugin keep rules in their own build pipelines. In Unity, code minification is off by default for release builds in a new project, so someone has to turn it on.
Tinder's case shows where to look first. Its broad rule came from an internal library, not a well-known third-party SDK. The team now advises auditing internal projects too, and a CI job reports how each contribution changes the optimisation figures.
A fix plan for SDK and library makers
Google's November guidance and its library documentation come down to a short list:
| Pattern in your consumer rules | Why it hurts apps | What to ship instead |
|---|---|---|
| Package-wide keep on your own code | Keeps all of it in every app | Keep only reflection and JNI entry points |
| Wildcard keep on a dependency's package | Overrides that dependency's narrow rules | Keep only the members you reflect on |
| Global options such as dontobfuscate | Aimed at the whole app's build, not your code | Remove them; AGP 9.0 blocks publishing by default |
| Keepnames to read stack traces | Blocks renaming in the app | Upload mapping files and use retracing tools |
| Rules only in documentation | Apps copy them and collect outdated rules | Package them as consumer rules |
| Unconditional keeps for optional adapters | Keeps features the app never uses | Conditional rules or Jetpack Keep |
Keep entry points, not packages
When a library reaches a class or method dynamically, its consumer rule only needs to name that entry point. R8 builds a graph from the entry points and removes whatever is unreferenced. This still applies if you already optimised or obfuscated the library when you built it. Google's example for an optional module whose constructor is called by reflection looks like this:
-keep class com.example.analytics.video.VideoEventTracker {
<init>();
}
For an AAR, consumer rules live in the file named by consumerProguardFiles in the library's build script. For a JAR, they go in META-INF/proguard/. Rules used only to build the library itself belong in proguardFiles.
Use conditional rules for optional features
R8's -if syntax makes a keep rule active only when a class specification has a match. For ad libraries loaded through mediation adapters, Google recommends conditional rules so that a feature or format is kept only when the app includes the corresponding adapter. Our illustrative rule, with made-up class names:
# Keep the video renderer only if the video adapter is in the app
-if class com.example.ads.mediation.VideoAdapter
-keep class com.example.ads.core.VideoRenderer {
<init>();
}
If the adapter class is itself loaded by name, it needs its own narrow rule as well. Teams changing their ads integration can pair this with our GMA Next-Gen SDK migration guide.
Let annotations write the rules
Jetpack Keep lets you annotate reflective and JNI code in Kotlin or Java source, and its Gradle plugin generates the keep rules at build time. For reflection the rules are conditional: the target is kept only if the calling code survives. Code called from JNI uses a separate annotation that keeps it unconditionally, so apply that one sparingly.
The plugin needs AGP 8.7 or higher, supports Android app, Android library, Kotlin Multiplatform and JVM library modules, and includes lint checks that flag unannotated reflection. The only release so far is 1.0.0-alpha01, dated 12 October 2026. Google warns that a later version could generate rules that keep less, causing errors such as ClassNotFoundException in release builds, so compare the generated rules on every upgrade.
Prefer code generation, cover JNI precisely
Google's main tip is to avoid reflection where code generation works. Serialisation and dependency injection are the usual candidates, and Hilt and Room are its examples. Where native code calls back into Kotlin or Java, as in game plugins and photo or video editors, provide rules for all the classes that use JNI. That includes your own types used as parameters or return values in those methods.
Stop using keepnames for debugging
Firebase Crashlytics, Play Console and Logcat in Android Studio already deobfuscate stack traces for app developers, so a trace they share with you is readable. SDK providers who upload a mapping file to Google Play SDK Console can see deobfuscated traces there too.
SDK Console also shows crash and ANR reports and adoption trends, so you can watch a narrower-rules release there. To verify ownership, though, your SDK must be installed in at least 10 apps with a combined total of 1 million active installs. Smaller maintainers should rely on sample-app testing and customer traces.
Test the way your customers build
Build a sample app with R8 full mode, the default since AGP 8.0, and run your critical user journeys. Run the R8 Configuration Analyzer on it so you see what your customers will see.
What changed in AGP 9 that matters here
Two AGP 9.0 changes affect these scores.
- The old default file is gone. AGP 9.0 dropped support for
proguard-android.txt, because it includes-dontoptimize. Useproguard-android-optimize.txtinstead. On an older AGP, check which file you use before blaming a library.
- Global options in libraries are blocked. Publishing a library now fails by default if its consumer rules contain options such as
-dontobfuscate. When an app on AGP 9.0 or later uses an already published library with such an option, the build silently ignores it and leaves a comment inconfiguration.txt. On AGP 8, the option can still apply to your whole app.
That change covers global options, not broad -keep rules, so upgrading the plugin will not fix a package-wide keep. If your Flutter build is still moving to AGP 9, our AGP 9 migration note for Flutter covers that side.
India-specific considerations
If your app combines payments, analytics, attribution, ads, identity checks and chat SDKs, each can bring its own consumer rules to trace. Low-memory phones raise the stakes: Tinder's largest engagement gains came in countries with a large share of low-RAM devices, which it did not name.
For teams here, the practical order is: run the R8 Configuration Analyzer on your release build this sprint, rank SDKs by the optimisation they block, and raise issues with vendors now. The vendor must narrow the rule, test it and publish, and you must then adopt the new version, all in about two months.
How eCorpIT can help
eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our Android developers can audit your R8 configuration and SDK keep rules, narrow the ones that hold your scores down, and add CI checks that catch regressions. Talk to us at /contact-us/.
Last updated: 2 December 2026.