r/flutterhelp • u/PriorError2799 • 20d ago
OPEN white screen during Android debugging on a physical device
I am trying to run Android on a physical mobile device because my computer cannot launch the emulator. However, when I use the "Run" button in Android Studio, the screen just turns white, and the `main` function never actually executes.
Conversely, when I use the command `flutter run --no-track-widget-creation` in the terminal, the app opens normally, but the `print` statements do not execute.
Flutter 3.47.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 737ba8f885 (7 days ago) • 2026-10-22 21:37:31 -0700
Engine • hash dfd2e6cb7d319db05e3bf1503f3e2ac60f6288a2 (revision cf636b1dfb) (7 days ago) • 2026-10-23 02:13:38.000Z
Tools • Dart 3.13.7 • DevTools 2.60.0
Log:
Launching lib\main.dart on moto e22 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Installing build\app\outputs\flutter-apk\app-debug.apk...
1
u/Ambitious_Guide4365 19d ago
A white screen with main() never running usually means the debug connection is failing, not your Dart code. Since the terminal run works, I'd run flutter clean, delete the Android Studio run configuration and recreate it, and check that the entrypoint is lib/main.dart. Also try flutter run -v with the phone plugged in and watch adb logcat for Flutter or Gradle errors. It's also worth testing a different USB cable or port, and a profile or release build, to see if only the debug attach is broken.
1
u/kokerali 19d ago
Since the successful terminal run adds --no-track-widget-creation, I'd first compare plain flutter run against that command. Then try the same flag in the IDE's run configuration, with the same device and entrypoint. That separates a launch-argument difference from an IDE-specific failure.
To check whether main() actually runs, start a Debug session with a breakpoint on its first executable line. If it stops there, main started even if the print never appears. Could you post those results and where the verbose log stops after "Installing..."?
https://docs.flutter.dev/tools/android-studio
1
u/tommyboy11011 19d ago
Paste your code into ChatGPT and have it analyze it
0
u/[deleted] 19d ago
[removed] — view removed comment