android – Flutter loads old version of app every time I restart the app-ThrowExceptions

Exception or error:

Every time I run the flutter app from IntelliJ, it loads an old outdated version of the app from days ago. The new version of the app is only loaded after a hot reload and even then, if I restart the app, the old version is loaded again.
I there any way I can fix this issue? It’s really frustrating.

How to solve:

This is a bug (https://github.com/flutter/flutter/issues/16604) because Flutter should better recognize when rebuilding is required,
but running

flutter clean

should fix it in the meantime

###

enter image description here

Easy way to do it using Android Studio as shown in snapshot.

###

Don’t know how this bug hasn’t been resolved by now.

But for any one also struggling with this (using visual studio code), who already tried “flutter clean”, the only thing that works for me is clicking on “restart” every time I start debugging.

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *