Praveesh Ramroop
Praveesh Ramroop

Reputation: 365

Flutter problem: Lost connection to device. Plugin implementation?

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:

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?

Upvotes: 6

Views: 5331

Answers (3)

Jason
Jason

Reputation: 933

I ran into this issue using:

Device: Medium Phone 
System Image: Android API 35
Text Editor: VSCode

I fixed the issue by downloading a new device and Android version through Android Studio Device Manager.

Device: Pixel 8 Pro
System Image: UpsideDownCake API 34
Text Editor: VSCode 

Upvotes: 0

GrahamD
GrahamD

Reputation: 3175

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

Upvotes: 2

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!

Upvotes: 2

Related Questions