Skip to content

Blank/empty UI on second run of app in Android emulator. #149328

@jlewallen

Description

@jlewallen

Steps to reproduce

Hello, this is an issue I'm seeing with a brand new flutter project on a local Android emulator.

flutter emulators --launch Pixel_7_API_VanillaIceCream
flutter create helpme
cd helpme
flutter run -d emulator-5554

At this point the application launches correctly, everything seems fine. I then close the application and rerun from inside the emulator and the application starts but everything is blank (white, nothing rendered). I believe the application is running fine, but there seems to be an issue with painting/rendering the UI.

Every time you run the application using flutter run it will correctly start.

A significant clue: If I clear the app cache, I'm able to run the application again. This is very reproducible. Effectively, to run the application, clearing the cache is necessary.

Forgive me if I'm leaving out anything critical in this bug report, it's my first time filing one with this project.

Thanks so much.

Expected results

There to be no difference when running a brand new app the second time and that to run a second time clearing the cache is not necessary.

Actual results

Running the app a second time w/o clearing the app cache results in a blank window with no UI rendered.

Code sample

I am able to reproduce this by creating a new project using:

flutter create helpme

Screenshots or Video

No response

Logs

Logs

I'm happy to provide these, but due to the nature of the issue the logs seem fine to me, and in order to reproduce the device connection must be lost. Happy to provide adb logs, though if those will help.

Flutter Doctor output

Doctor output
~/helpme main*​​​ 3sflutter doctor -v
[✓] Flutter (Channel stable, 3.19.5, on Linux Mint 21 5.15.0-107-generic, locale en_US.UTF-8)
    • Flutter version 3.19.5 on channel stable at /home/jlewallen/tools/flutter-3.19.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (9 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/jlewallen/tools/android-sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /home/jlewallen/tools/android-sdk
    • Java binary at: /home/jlewallen/tools/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2023.3)
    • Android Studio at /home/jlewallen/tools/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] Connected device (4 available)
    • SM J701M (mobile)            • 5200ae734a8895df • android-arm    • Android 9 (API 28)
    • sdk gphone64 x86 64 (mobile) • emulator-5554    • android-x64    • Android 14 (API 34) (emulator)
    • Linux (desktop)              • linux            • linux-x64      • Linux Mint 21 5.15.0-107-generic
    • Chrome (web)                 • chrome           • web-javascript • Google Chrome 125.0.6422.112

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levelplatform-androidAndroid applications specificallyr: solvedIssue is closed as solvedteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions