Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
R8: 3.1.48, 3.3.67 AGP 7.1 fullmode: false
Our project uses strong references to classes in fields to preserve it in memory and provide weak reference to field outside of class. Field initialized in constructor. When our project used proguard all works as expected. Proguard see what field realy used and preserve it. R8 in compatibility mode (fullMode=false) shows different behaviour. Field removed and object used as local variable. Strong reference is lost, object GC-ed. Such behaviour occurred only in release builds.
Sample project to reproduce bug is attached.