skip to Main Content

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


  1. I have two times facing this issue, to fix it sometime it is a bit tricky.

    It is coming from 2 possibilities:

    1. Device you are using
    2. Invalid SDK after accidentally updates its version.

    But, if the problem is on your device, try this.

    1. Reset the debug authorization on your device
      Go to settings > developer options > revoke USB debbuging authorization.

    If problem persist.

    1. Check the disable adb auth timeout if it unchecked.

    2. 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!

    Login or Signup to reply.
  2. 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:

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search