Flutter UI not appearing when running without debug mode
I’m encountering a strange issue with my Flutter app. When I run the app in debug mode, everything works as expected and the UI is visible. However, when I run the app in non-debug mode (without debugging), the UI doesn’t show up on the screen.
Here’s what happens:
- The app seems to be running because I can interact with elements on the screen.
- For example, I can press buttons, and they give feedback (e.g., button press animation).
- The keyboard animation also appears when I focus on a text field.
But the actual UI content (text, buttons, etc.) doesn’t render on the screen.
I’ve attached a screenshot of the current screen behavior for reference:
Has anyone experienced something like this before or have any ideas on what could be causing this issue? I’ve tried restarting the emulator and ensuring everything is up to date, but the issue persists.
Flutter doctor:
> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.3, on Ubuntu 24.04.1 LTS 6.8.0-51-generic,
locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version
35.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2024.1)
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.3)
[✓] VS Code (version 1.96.4)
[✓] VS Code (version 1.96.4)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Tools i used:
- Vscode
- Android studio koala 2024.1.1
- Ubuntu OS
log console:
Launching lib/main.dart on sdk gphone16k x86 64 in debug mode...
✓ Built build/app/outputs/flutter-apk/app-debug.apk
I/flutter ( 4077): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(60)] Using the Impeller rendering backend (Vulkan).
Connecting to VM Service at ws://127.0.0.1:40267/Q6xjVd242Bs=/ws
Connected to the VM Service.
I/MESA ( 4077): exportSyncFdForQSRILocked: call for image 0x7e7727d92250 hos timage handle 0x70002000004be
I/MESA ( 4077): exportSyncFdForQSRILocked: got fd: 148
I/MESA ( 4077): exportSyncFdForQSRILocked: call for image 0x7e7727d8f510 hos timage handle 0x70002000004c2
I/MESA ( 4077): exportSyncFdForQSRILocked: got fd: 153
D/ProfileInstaller( 4077): Installing profile for com.example.learn_bloc
Source: View source