I cannot solve this error. The app seems to build just fine but, for some reason, can’t seem to connect to the emulator. It always ends with "Lost connection to device" while installing. I also tried it on a physical device, still won’t work. I have tried numerous possible solution, but none of them worked.
What I’ve checked:
- Memory enough
- No connection problem
- flutter doctor -v shows no issues
The problem might be some plugin issue, but I don’t know what or how to solve it. It also might be something else. If further code or information is required do let me know. Does anyone know how to solve this issue?
2
Answers
I have two times facing this issue, to fix it sometime it is a bit tricky.
It is coming from 2 possibilities:
But, if the problem is on your device, try this.
Go to settings > developer options > revoke USB debbuging authorization.
If problem persist.
Check the disable adb auth timeout if it unchecked.
Modify the Logger buffer size to max (Mine is set off before, now it is 8MB, and changing this to 64k is working on small apps, but bigger apps need to log the debug process much bigger so it needs to increase its capacity).
Hope this can helps you mate!
What usually fixes it for me is to close the emulator, go into Android Studio Device Manager and ‘Wipe Data’ for that emulator. See image: