Issue
This error is displayed always when running my flutter app either from VSCode, Android Studio or a terminal by executing command flutter run
Error waiting for a debug connection: The log reader stopped unexpectedly
Error launching application on M2004J19C.
Where M2004J19C is my Xiaomi Redmi 9 phone code.
Stumbled upon this stack overflow question and tried pretty mush every possible solution in it.
- restarting the device solved the problem once only, each time is rebooted again the issue persist.
- cleaning cache and running flutter clean solved nothing, unfortunately.
- Upgrading from
flutter 2.2.0
to2.2.3
also solved the problem for a period of time, only yesterday the app was running on the device after upgrading flutter, but today it is not. - Re-enabling developer options, USB debugging and even trying wireless debugging.
- the cable is a new one
- before updating the OS, the app was running normally.
To confirm it is caused by the update, tried debugging the app on another device, Samsung A10 specifically, the app ran as expected.
So any advice? or anything helpful? i don't want to revert the update, if that is possible, since it has security patch.
Solution
I had to remove all my android sdk folder and re-install everything again. the funny thing is the sdk was deleted by mistake.
Answered By - joe_inz