In February 2027 Google Play will start requiring a minimum level of code optimization from large apps and games. We are talking about DEX code: at least 25% optimization, obfuscation and shrinking for every upload to Play Console. It sounds like the app team's own business, but there is a catch: the result depends on more than your code. It is also affected by the keep rules that third-party libraries ship with themselves.

On 17 November 2026 the Android Developers team published a guide for library authors explaining how overly broad rules block optimization in apps. Here is what it means for your product and how to check your dependencies before the deadline.

What Google Play requires

According to the Google Play help page, the new requirement applies from February 2027 and covers all form factors:

  • a minimum of 25% optimization, obfuscation and shrinking for uploads to Play Console;
  • it applies only to apps with more than 10 MB of DEX code and games with more than 50 MB of DEX code; smaller projects are not required to optimize;
  • the numbers for each app bundle are visible in the app bundle explorer in Play Console (Release → Releases overview); builds from CI/CD may differ slightly from the uploaded one;
  • the tool is not prescribed: any shrinker or optimizer works, such as R8, and Google recommends the R8 Configuration Analyzer for tuning.

Google stresses that Play requirements are not optional: failing to meet one "can affect an app's visibility and publishing capabilities" on Google Play. The page does not list separate penalties for DEX optimization specifically.

Why dependencies can block the result

R8 removes unused code, optimizes the rest and obfuscates names. But it can only work within the limits set by keep rules. And you are not the only one writing them: libraries ship consumer keep rules embedded in the AAR or JAR so that R8 does not remove classes the library reaches through reflection or JNI.

The problem is that library authors often play it safe. To keep an SDK from crashing on a removed class, they add a rule for an entire package. A typical example from Google's guide:

-keep public class com.google.android.gms.** { *; }

A rule like this makes R8 keep everything in the package, even if the app uses only a tiny part of it. If you yourself restricted another GMS library to a narrow rule, the SDK's broad rule overrides yours. According to Google, the result is a bloated app, slower startup, more memory use, a bigger download and a higher ANR rate. And the numbers in Play Console reflect the combined impact of the rules from your code and from your libraries.

What Google advises library authors, and what you should check

PracticeThe ideaWhat to check in your project
Narrow rulesDescribe only what the library reaches through reflection; for dynamic access the entry point is enough, and R8 handles the restWhether your dependencies ship rules like com.vendor.**
Codegen instead of reflectionSerialization and dependency injection work better with code generation (Hilt is an example): R8 sees code usage at build timeWhich libraries still rely on reflection
Conditional keep rulesFor example for ad mediation adapters: keep a format only if the matching adapter is includedWhether you pull in ad adapters you do not need
Rules in the library, not in documentationConsumer rules have been supported in AARs and JARs for years; rules in documentation create manual work and leftovers of obsolete rulesWhether your proguard-rules.pro still contains "README recipes" that are no longer needed
JNI targetsSDKs with native code (games, photo and video editors) need rules for every class used through JNIIf you use Unity or Unreal, check the plugins

Google also advises against using keepnames just to get readable stack traces: Firebase Crashlytics, Play Console and Logcat in Android Studio deobfuscate traces from the mapping file on their own, so there is no need to disable obfuscation for that.

How to check your app in one day

  1. Open the numbers in Play Console. In the app bundle explorer look at the DEX size and optimization percentage of the uploaded bundle. If the DEX is under 10 MB (50 MB for a game), the requirement does not affect you.
  2. Run the R8 Configuration Analyzer. It shows optimization, shrinking and obfuscation percentages, and also inefficient keep rules: yours and the consumer rules from libraries.
  3. Find the broadest rules. Look for package patterns with ** and { *; }. The analyze command in Android CLI shows used and unused package-wide keep rules in an AAR or JAR.
  4. Test critical flows in a release build. After every rule change, go through sign-in, payment and the main flow: errors caused by removed classes only show up in an optimized build.
  5. Talk to the library authors. If an SDK ships broad rules, file an issue with the analyzer result. That is better than maintaining your own rules that override the library's: according to Google, such apps then become reluctant to update the library for fear of risk.

It is also worth watching SDK versions in the Google Play SDK Console and uploading the mapping file so you can see deobfuscated traces.

Why it matters for the product

For product teams this is more than technical hygiene. Google links DEX optimization to faster startup and lower memory use, and the Play requirement means optimization becomes a condition of publishing rather than a nice-to-have. If your Android app has not had its R8 configuration reviewed in a long time, schedule an audit before February 2027: it is better to find a blocker calmly than on release day.

Need an R8 configuration audit or help optimizing an Android app? Get in touch: we will look at your build and dependencies and propose a plan.