Flutter应用非Debug模式下UI不显示但可交互问题求助
Flutter非Debug模式UI内容无法渲染但可交互问题求助
Debug模式下应用UI正常显示、功能完全可用,但切换至Release/Profile模式运行时,文本、按钮等UI内容无法渲染显示。应用仍在后台运行,且能与屏幕元素交互——比如按钮按下有动画反馈,聚焦输入框时键盘会正常弹出。
已尝试重启模拟器、将Flutter及相关环境更新至最新版本,问题仍未解决。
相关信息
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!
使用工具
- VS Code
- Android Studio Koala 2024.1.1
- Ubuntu OS
控制台日志输出
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 hostimage handle 0x70002000004be I/MESA ( 4077): exportSyncFdForQSRILocked: got fd: 148 I/MESA ( 4077): exportSyncFdForQSRILocked: call for image 0x7e7727d8f510 hostimage handle 0x70002000004c2 I/MESA ( 4077): exportSyncFdForQSRILocked: got fd: 153 D/ProfileInstaller( 4077): Installing profile for com.example.learn_bloc
问题截图

请问有没有人遇到过类似问题,或者能提供排查方向建议?
内容的提问来源于stack exchange,提问作者Raihan Firdaus
相关产品推荐
相关产品推荐

