I upgraded Flutter to 2.0.0 recently and am stuck with this issue. flutter run
and flutter run --profile
work perfectly well, but flutter run --release
makes app crash after startup. There is no stacktrace, there is no error or warning, there is no build issue or verbose warning, no hint really. I googled a lot, but similar questions were answered like "try to remove this line" or "try to add that line". I couldn't find any clear steps on how to debug what's wrong.
What steps should I take to debug this issue and find the root cause instead of trying meaningless changes on code hoping some of them will eventually fix the issue?
Use adb logcat
OR
Enable debugging in release build, by modifying your android/app/build.gradle like this
buildTypes {
release {
debuggable true
shrinkResources false
minifyEnabled false
...
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With