androidflutterdebuggingxiaomi

Couldn't debug android applications after MIUI update to 12.0.1.0 stable


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.

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.