You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: replace android.r8.strictFullModeForKeepRules=false with explicit keep rules before AGP 11 #4783
#4566 (React Native 0.87.1, AGP 9.2.1) sets android.r8.strictFullModeForKeepRules=false in android/gradle.properties (6efe9af). Without it, R8 removes no-arg constructors that libraries create through reflection, and release builds crash on launch (WorkDatabase_Impl) or the QR scanner fails to start (ML Kit registrars).
AGP 9 defaults this option to true, deprecates it in AGP 10 and removes it in AGP 11. Before we move to AGP 11, the flag needs to be replaced with explicit rules in android/app/proguard-rules.pro.
Consumer rules known to rely on the old behavior (a -keep class rule with no member list):
room-runtime 2.5.0: -keep class * extends androidx.room.RoomDatabase
work-runtime 2.8.1: -keep class * extends androidx.work.InputMerger
Likely replacements:
-keep class * extends androidx.room.RoomDatabase { <init>(); }
-keep class * implements com.google.firebase.components.ComponentRegistrar { <init>(); }
-keep class * extends androidx.work.InputMerger { <init>(); }
This list may be incomplete. To find the rest, run ./gradlew :app:minifyReleaseWithR8 with the flag removed and diff app/build/outputs/mapping/release/usage.txt against a build with the flag set. Any <init>() that only appears in the strict build needs a rule. Bumping these libraries may also fix some of them upstream, since newer releases ship explicit <init>() rules.
Testing: a signed release build must launch and open the QR scanner, and a WorkManager job must run.
Activity