1

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

5 Answers 5

1

No need to change Emulated Performance graphics to SOFTWARE. Just go to emulator extended controls and select settings then change the OpenGL ES API level to [Compatibility (OpenGL ES 1.1/2.0)]. Close your emulator and start it again. This works for me and makes my day.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

0

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.

1 Comment

Thanks for the comment. I have 32 GB ram and I have increased the emulator ram from 2GB to 4GB + increasing heap sapce from 256mb to 512mb. I wiped the emulator and the issue is still reproducable.
0

Following Emulator: glClear:466 GL err 0x502, changing the emulated performance graphics from Automatic to Software solves the issue.

Comments

0

It is due to the Ram Issues, either stop some background tasks or increase RAM

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.