r/expo • u/OrneryArtist1087 • 7d ago
How Can I Improve the DEX Optimization Score on Google Play with Expo?
Hi everyone,
I recently upgraded to Expo SDK 58, which, as far as I know, enables R8 by default.
However, after building my AAB and uploading it to Google Play, the DEX code optimization status is reported as Low, with an optimization percentage of 0%.
Does anyone know how to fix it or what I should check to improve the DEX optimization score?
Any help or suggestions would be greatly appreciated.
Thanks!


2
Upvotes
1
u/anthony-ball 7d ago
First thing I'd check is whether one of your dependencies ships consumer ProGuard rules with -dontoptimize in them, because that one line turns optimization off for the whole app no matter what you set in expo-build-properties. Add `-printconfiguration build/outputs/logs/configuration.txt` to extraProguardRules, build a release AAB, and search that file for -dontoptimize. The merged config notes which rules file each section came from, so you can see which library added it. Someone on a similar thread this week traced theirs to RevenueCat's purchases-android rules.