skip to Main Content

When I run the flutter project for the first time it installs the app in the emulator device and it works normally, hot reload and hot restart also works fine. However, as soon as I stop and run the app again, the app hangs in either a white screen or it shows part of some widgets that they didn’t finish loading yet.

I tried,

  • running the app in vscode and in android studio using different virtual devices (3)
  • re-installed flutter
  • re-installed android studio
  • ran flutter clean, flutter pub get multiple times
  • flutter create .
  • restarting the pc

with no luck. I’m not sure what I did wrong in the setup / installation process. And I googled the issue but nothing relatable came up.

The console doesn’t show any errors too.

Reproduction steps:

  1. Create a sample flutter project for android (counter sample app)

  2. Spin up an emulator device

  3. Run the app (should work fine) -> stop it completely -> run it again (this time it should show a blank screen) -> clear the cache from the emulator device -> run it again and it should work fine

I’m using latest flutter + android studio. API 35

2

Answers


  1. I was experiencing the same behavior that you describe. I created another emulator with an older API (31), and that mitigated the issue. Maybe Flutter is not yet fully compatible with API 35.

    Login or Signup to reply.
  2. Sometimes, there are RAM issues in your laptop or emulator. When you encounter this, either increase the memory of your emulator or wipe the emulator.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search