Skip to content
flutter release build crashes on launch only on some samsung phones, debug is fine
question1 min read59 viewsOct 1, 2026

flutter release build crashes on launch only on some samsung phones, debug is fine

Tunde Adebayo@tunde_ade

October 1, 2026 · 1 min read

#1 in Thumb Zone

59 views4 comments

abeg help, this one is killing me. app works perfectly in debug and profile on all our test phones. the release build from the play store crashes immediately on launch on some samsung A series phones (android 11 and 12). not all of them

what i've tried:

  • flutter clean, rebuilt, same thing
  • crashlytics shows a native stack trace with obfuscated names, something like a ClassNotFoundException deep inside a plugin
  • bumped all plugins to latest, no change
flutter build appbundle --release --obfuscate --split-debug-info=build/symbols

it started after we added a new payments SDK plugin. i suspect R8/proguard but i dont know how to prove it

Accepted answer

Yuki Tanaka#2 in Thumb Zone3 likes

I am iOS person but our Android team had the same thing. ClassNotFoundException only in release is almost always R8 removing a class that the SDK loads by reflection. Only some phones because the SDK takes a different code path depending on the device. To prove it: make one release build with minify disabled in android/app/build.gradle (minifyEnabled false in the release buildType). If the crash disappears, it is R8. Then add keep rules for the SDK package in android/app/proguard-rules.pro (the SDK docs usually list them), for example: -keep class com.vendor.payments.** { *; } and turn minify back on.

View in the thread

Written by

Tunde Adebayo

Mobile dev (Flutter + React Native) at an agency in Lagos. building fintech and logistics apps mostly. if your app is slow on a 2GB android phone, its not "fine". football on weekends

Get the best of #thumb_zone weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.

Comments

4

Sign in to join the conversation.

Sign in to comment

Accepted answer

Yuki Tanaka@yuki_ios#2 in Thumb Zone
I am iOS person but our Android team had the same thing. ClassNotFoundException only in release is almost always R8 removing a class that the SDK loads by reflection. Only some phones because the SDK takes a different code path depending on the device. To prove it: make one release build with minify disabled in android/app/build.gradle (minifyEnabled false in the release buildType). If the crash disappears, it is R8. Then add keep rules for the SDK package in android/app/proguard-rules.pro (the SDK docs usually list them), for example: -keep class com.vendor.payments.** { *; } and turn minify back on.
3 net votes
Tunde Adebayo@tunde_ade#1 in Thumb Zone
IT WAS R8. one build with minify off, crash gone. the keep rules were hidden in the sdk FAQ, not in the setup guide 🙄 added them, minify back on, works on all the samsungs. yuki thank you
1 net votes
Jake Morrison@jakemakesgames#6 in Thumb Zone
an ios dev saving an android app in tunde's own topic. you're never living this down mate
1 net votes
Marcus Johnson@marcus_oncall#4 in Thumb Zone
also upload those symbols to crashlytics so the stack traces are readable next time. the split-debug-info folder isnt doing anything sitting on your laptop
1 net votes