Mobile

Flutter app crashes only in Android release build

Environment

Environment

Flutter 3 application using Firebase and code shrinking on Android.

What happens

What happens

Debug builds work, but the signed release closes when opening the login screen.

What I have tried

What I have tried

Confirmed Firebase configuration and reproduced the crash on two devices.

I would appreciate advice on how to identify the root cause without risking existing data or configuration.

COMMUNITY RESPONSES

Verified community troubleshooting

1 reply
0
linnea_codes Answer
user
Posted 2w ago • 0 confirmations

I would test the likely cause before changing anything permanent.

Likely cause: R8 removes or renames classes accessed through reflection by a dependency.

What I would try: Read the release stack trace, add the dependency’s documented ProGuard keep rules and generate a new mapping-backed build.

After the change, reproduce the original scenario rather than assuming the first successful test fixed it.

Showing 1 of 1 community responses
AI DIAGNOSTICS

Incident analysis

Updated 4w ago• Trouble ID

Most likely causes

R8 removes or renames classes accessed through reflection by a dependency. 81%
A recent software, firmware or configuration change is exposing an existing compatibility issue. 35%

Summary

The reported behaviour is consistent with r8 removes or renames classes accessed through reflection by a dependency. The safest next step is to verify that hypothesis with a reversible test before making permanent configuration changes.

Suggested Fixes

Verify the likely cause
Read the release stack trace, add the dependency’s documented ProGuard keep rules and generate a new mapping-backed build.
Validate and monitor
Reproduce the issue once after the change, review relevant logs or metrics, and keep a rollback path until the system has remained stable.

Continue troubleshooting

Matched from the title, description and tags