Flutter: Lost connection to device

Created on 26 Sep 2018  ·  29Comments  ·  Source: flutter/flutter

Debugger occasionally looses the connection to the emulator, even if no hot reloads are taken place.
These are the logcat output:

09-26 11:08:27.130 1592-1627/system_process W/InputDispatcher: channel '89f29e1 com.example.yabcoshowcase/com.example.yabcoshowcase.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
09-26 11:08:27.130 1592-1627/system_process E/InputDispatcher: channel '89f29e1 com.example.yabcoshowcase/com.example.yabcoshowcase.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
09-26 11:08:27.132 1592-2208/system_process D/GraphicsStats: Buffer count: 1
09-26 11:08:27.132 1592-2207/system_process I/WindowState: WIN DEATH: Window{89f29e1 u0 com.example.yabcoshowcase/com.example.yabcoshowcase.MainActivity}
09-26 11:08:27.132 1592-2207/system_process W/InputDispatcher: Attempted to unregister already unregistered input channel '89f29e1 com.example.yabcoshowcase/com.example.yabcoshowcase.MainActivity (server)'
09-26 11:08:27.135 1592-2207/system_process W/WindowManager: Force-removing child win Window{c9b4174 u0 SurfaceView} from container Window{89f29e1 u0 com.example.yabcoshowcase/com.example.yabcoshowcase.MainActivity}
09-26 11:08:27.167 1592-2017/system_process I/ActivityManager: Process com.example.yabcoshowcase (pid 24585) has died
09-26 11:08:27.167 1592-2017/system_process W/ActivityManager: Force removing ActivityRecord{a3fe1ef u0 com.example.yabcoshowcase/.MainActivity t37}: app died, no saved state
09-26 11:08:27.189 1592-1733/system_process W/WindowManager: Failed looking up window
                                                             java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@f8d9306 does not exist
                                                                 at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8733)
                                                                 at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8724)
                                                                 at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1209)
                                                                 at android.os.BinderProxy.sendDeathNotice(Binder.java:558)
09-26 11:08:27.189 1592-1733/system_process I/WindowState: WIN DEATH: null
09-26 11:08:27.210 1592-2017/system_process I/ActivityManager: Start proc 24856:com.android.launcher3/u0a9 for activity com.android.launcher3/.Launcher
09-26 11:08:27.291 24856-24856/? W/System: ClassLoader referenced unknown path: /system/priv-app/Launcher3/lib/x86
09-26 11:08:27.383 24856-24856/? V/Launcher: LauncherAppState inited
09-26 11:08:27.420 24856-24856/? D/Launcher.Model: Old launcher provider: content://com.android.launcher2.settings/favorites?notify=true
09-26 11:08:27.420 24856-24856/? D/Launcher.Model: Old launcher provider does not exist.
09-26 11:08:27.568 24856-24866/? I/art: Background sticky concurrent mark sweep GC freed 1475(316KB) AllocSpace objects, 2(40KB) LOS objects, 26% free, 1081KB/1475KB, paused 8.974ms total 23.902ms
09-26 11:08:27.647 1592-1606/system_process I/ActivityManager: Start proc 24873:com.google.android.googlequicksearchbox:search/u0a16 for broadcast com.google.android.googlequicksearchbox/.SearchWidgetProvider
09-26 11:08:27.650 24856-24869/com.android.launcher3 W/Launcher: setApplicationContext called twice! old=android.app.Application@a24fb01 new=android.app.Application@a24fb01
09-26 11:08:27.654 24873-24879/? E/art: Failed writing handshake bytes (-1 of 14): Broken pipe
09-26 11:08:27.654 24873-24879/? I/art: Debugger is no longer active
09-26 11:08:27.681 1592-1993/system_process I/AccountManagerService: getTypesVisibleToCaller: isPermitted? true
09-26 11:08:27.759 1217-2028/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
09-26 11:08:27.759 24856-24887/com.android.launcher3 D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                       [ 09-26 11:08:27.787 24856:24856 D/         ]
                                                                       HostConnection::get() New Host Connection established 0xaa123380, tid 24856


                                                                       [ 09-26 11:08:27.787 24856:24856 W/         ]
                                                                       Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 

                                                                       [ 09-26 11:08:27.844 24856:24887 D/         ]
                                                                       HostConnection::get() New Host Connection established 0xaa123a00, tid 24887


                                                                       [ 09-26 11:08:27.844 24856:24887 W/         ]
                                                                       Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 
09-26 11:08:27.844 24856-24887/com.android.launcher3 I/OpenGLRenderer: Initialized EGL, version 1.4
09-26 11:08:27.845 24856-24887/com.android.launcher3 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-26 11:08:27.846 24856-24887/com.android.launcher3 D/EGL_emulation: eglCreateContext: 0xae413ae0: maj 2 min 0 rcv 2
09-26 11:08:27.856 24856-24887/com.android.launcher3 D/EGL_emulation: eglMakeCurrent: 0xae413ae0: ver 2 0 (tinfo 0xae43af90)
09-26 11:08:27.870 24873-24873/? I/BackgroundMemoryTrimmer: Trimming objects from memory, since app is in the background.
09-26 11:08:27.890 24856-24887/com.android.launcher3 D/EGL_emulation: eglMakeCurrent: 0xae413ae0: ver 2 0 (tinfo 0xae43af90)
09-26 11:08:27.952 1592-1611/system_process I/ActivityManager: Displayed com.android.launcher3/.Launcher: +759ms
09-26 11:08:27.953 1592-1604/system_process W/InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 24585 uid 10064
09-26 11:08:28.005 24856-24856/com.android.launcher3 D/Launcher: bindAppWidget: AppWidget(id=4)
09-26 11:08:28.005 24856-24856/com.android.launcher3 D/Launcher: bindAppWidget: id=4 belongs to component ComponentInfo{com.android.deskclock/com.android.alarmclock.AnalogAppWidgetProvider}
09-26 11:08:28.107 24856-24856/com.android.launcher3 D/Launcher: bound widget id=4 in 102ms
09-26 11:08:28.238 24856-24887/com.android.launcher3 V/RenderScript: 0xa1cb5000 Launching thread(s), CPUs 2
debugging platform-android platform-windows crash

Most helpful comment

@zoechi
My Conclusion: 7 MB of gif animations take about more than 1 GB of memory in flutter.
So the OS kills the app on low memory conditions.

All 29 comments

Please add the output of flutter doctor -v.

@zoechi

[√] Flutter (Channel dev, v0.9.3, on Microsoft Windows [Version 6.3.9600], locale en-US)
    • Flutter version 0.9.3 at M:\flutter
    • Framework revision eed8c7ad07 (5 days ago), 2018-09-20 16:30:07 -0700
    • Engine revision 71457a67d0
    • Dart version 2.1.0-dev.5.0.flutter-c688d0c0c3

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at D:\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = D:\Android\sdk
    • Java binary at: C:\Program Files\Java\jdk1.8.0_45\bin\java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
    • All Android licenses accepted.

[X] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).

[√] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)

! Doctor found issues in 1 category.

Did this start with an update or did you see this also with older versions?

@zoechi I saw this on both the previous and the current version.
I can see this also when launching browser within the application.
launch("url");

is this due to a memory shortage?

I'm using 4 gif animations on my widget.

Emulator Specs:
Ram: 1536
VM heap: 256

@zoechi
profiler

Animated gifs rings a bell
I found https://github.com/flutter/flutter/issues/9707#issuecomment-421735556

Uh, this what was I remembered seeing https://github.com/flutter/flutter/issues/20998#issuecomment-420101036
but that is about iOS

Yes, on Windows, Lost connection to device appears on full-restart (using the green play button in Android Studio). I have also noticed that it does not happen with hot-reloads on saving the files.

May be helpful to mention that the animations are around a total of 7 MB of size.

@zoechi I released and tested the app on 2 samsung devices, and it is not crashing,
this is only crashing, on emulator and on windows.

@zoechi
Tested on older devices with lower memories,
The app crashes out of blue.

@zoechi
My Conclusion: 7 MB of gif animations take about more than 1 GB of memory in flutter.
So the OS kills the app on low memory conditions.

I'm experiencing the same issue. The app worked fine on the emulator initially, however, when I updated flutter, I'm getting the 'lost connection to device' error. Flutter doctor says no issues found!

I have same problem. Then i switched to another emulator works again but then I do a full restart get same issue.

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
D/        (15109): HostConnection::get() New Host Connection established 0xaf108640, tid 15134
D/EGL_emulation(15109): eglMakeCurrent: 0xa192b0c0: ver 3 0 (tinfo 0xaf103280)
D/skia    (15109): Program linking failed.
E/emuglGLESv2_enc(15109): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glLinkProgram:1310 GL error 0x501
E/eglCodecCommon(15109): glUtilsParamSize: unknow param 0x00008741
E/emuglGLESv2_enc(15109): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetProgramBinary:3785 GL error 0x502
F/libc    (15109): /buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed
F/libc    (15109): Fatal signal 6 (SIGABRT), code -6 in tid 15134 (1.gpu)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_google_phone_x86/generic_x86:7.1.1/NYC/4316688:user/release-keys'
Revision: '0'
ABI: 'x86'
pid: 15109, tid: 15134, name: 1.gpu  >>> com.example.elisamparent <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '/buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed'
eax 00000000  ebx 00003b05  ecx 00003b1e  edx 00000006
esi 934e0978  edi 934e0920
xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
eip af786424  ebp 934ddf28  esp 934ddecc  flags 00000296
backtrace:
#00 pc ffffe424  [vdso:af786000] (__kernel_vsyscall+16)
#01 pc 0007a03c  /system/lib/libc.so (tgkill+28)
#02 pc 00075885  /system/lib/libc.so (pthread_kill+85)
#03 pc 0002785a  /system/lib/libc.so (raise+42)
#04 pc 0001ee36  /system/lib/libc.so (abort+86)
#05 pc 00023d48  /system/lib/libc.so (__libc_fatal+40)
#06 pc 0001f300  /system/lib/libc.so (__assert2+64)
#07 pc 0062ef04  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#08 pc 0062f377  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#09 pc 0062f179  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#10 pc 0062e7be  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#11 pc 0062e713  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#12 pc 00631c48  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#13 pc 00631c80  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#14 pc 007ea473  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#15 pc 007e5d66  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#16 pc 007e747b  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#17 pc 00771588  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#18 pc 00773824  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#19 pc 007a5df1  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#20 pc 007802fd  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#21 pc 007801d0  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#22 pc 0076d297  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#23 pc 0076d7d8  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#24 pc 007fa23b  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#25 pc 007fa14b  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#26 pc 006bf399  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#27 pc 009ebcb0  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#28 pc 0069a281  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#29 pc 006a0c03  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#30 pc 006a1066  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#31 pc 006a1324  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#32 pc 006a0f15  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#33 pc 006a1256  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#34 pc 0066a615  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#35 pc 0066a560  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#36 pc 0066c6a0  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#37 pc 00018360  /system/lib/libutils.so (_ZN7android20SimpleLooperCallback11handleEventEiiPv+48)
#38 pc 00019307  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+1207)
#39 pc 00018d84  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+68)
#40 pc 0000f77c  /system/lib/libandroid.so (ALooper_pollOnce+108)
#41 pc 0066c7a3  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#42 pc 00668d86  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#43 pc 0066ae7b  /data/app/com.example.elisamparent-1/lib/x86/libflutter.so (offset 0x5c7000)
#44 pc 00074fe2  /system/lib/libc.so (_ZL15__pthread_startPv+210)
#45 pc 0002029e  /system/lib/libc.so (__start_thread+30)
#46 pc 0001e076  /system/lib/libc.so (__bionic_clone+70)
Lost connection to device.
Exited (sigterm)

Me too having same problem, after creating the new flutter project today. My flutter version is 1.5.4-hotfix.2, i have few old projects those are working fine. Checked doctor -v got "No issues found".

Happening for me as well with version 1.5.4-hotfix.2, both in VS Code and just flutter run. Happens consistently every time at the moment, so cannot debug my app 😬

Last part of logs as it happens:

[ +355 ms] DevFS: Sync finished
[        ] Syncing files to device Linus Unnebäck’s iPhone... (completed in 1,805ms)
[        ] Synced 2.6MB.
[   +1 ms] Sending to VM service: _flutter.listViews({})
[   +3 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x10881e018, isolate: {type: @Isolate, fixedId: true, id: isolates/455448668, name:
main.dart$main-455448668, number: 455448668}}]}
[   +1 ms] <- accept
[        ] Connected to _flutterView/0x10881e018.
[   +1 ms] 🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[        ] An Observatory debugger and profiler on Linus Unnebäck’s iPhone is available at: http://127.0.0.1:1029/GN_VjrKVP40=/
[        ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
[+4999 ms] Service protocol connection closed.
[        ] Lost connection to device.
[   +1 ms] DevFS: Deleting filesystem on the device
(file:///private/var/mobile/Containers/Data/Application/5A554AFC-CA4D-4D84-B193-703F91254B9C/tmp/done-flutternbB65r/done-flutter/)
[        ] Sending to VM service: _deleteDevFS({fsName: done-flutter})
[ +256 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed

Same to me.

flutter doctor -v
[✓] Flutter (Channel unknown, v1.5.8, on Mac OS X 10.14.5 18F132, locale en-JP)
    • Flutter version 1.5.8 at /Users/dddrop/flutter
    • Framework revision 0ba67226ee (9 weeks ago), 2019-04-24 17:18:28 -0700
    • Engine revision c63d1cf9c9
    • Dart version 2.3.0 (build 2.3.0-dev.0.1 1f1592edce)


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/dddrop/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • ANDROID_HOME = /Users/dddrop/Library/Android/
    • ANDROID_SDK_ROOT = /Users/dddrop/Library/Android/sdk
    • Java binary at: /Users/dddrop/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5522156/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.7.2

[✓] Android Studio (version 3.4)
    • Android Studio at /Users/dddrop/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5522156/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
    • IntelliJ at /Users/dddrop/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 36.1.4
    • Dart plugin version 191.7830

[!] VS Code (version 1.35.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • IPHONE• a006df95b298dcc6c0501102141574b6deaa3f63 • ios • iOS 12.3.1
flutter run -v

Last part of logs as it happens:

[   +2 ms] 🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[        ] An Observatory debugger and profiler on **** is available at: http://127.0.0.1:1026/X5z2drAnFY8=/
[        ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
[+1990 ms] flutter: ApiService.updatePushToken: *****
[+3008 ms] Service protocol connection closed.
[   +1 ms] Lost connection to device.
[   +2 ms] DevFS: Deleting filesystem on the device (file:///private/var/mobile/Containers/Data/Application/0FD40F36-A700-43D8-BF90-D745C9E2FDF1/tmp/carapp-flutterSkuokV/carapp-flutter/)
[        ] Sending to VM service: _deleteDevFS({fsName: ************})
[ +260 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[   +3 ms] "flutter run" took 51,461ms.
[        ] "flutter run" took 51,461ms.

Solution

In my case, It's fixed by this:
https://github.com/flutter/flutter/issues/35102#issuecomment-505952116

You can check stackoverflow answer. This may solve your problem
Flutter: “Lost connection to device” error after Hot Reload

I am having the same issue here...I am having a gif displaying in the background of the app and it leads to app crash after a few seconds

Hi @p30arena
are you still experiencing this issue with the latest stable version of flutter?
thank you

Hi! i am still facing the issue on the Flutter 1.12 hotfix 7 ! Please provide me with the solution ASAP.

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v' please.
All system setups can be slightly different so it's always better to open new issues and reference related issues.

@iapicca
Hi!
The app crashes from time to time, after a dozen updates to the code, but I haven't experienced this issue recently.

Reloaded 0 of 682 libraries in 92ms.
Lost connection to device.
* First throw call stack:
(
0 CoreFoundation 0x000000010f9248db __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010e7d9ac5 objc_exception_throw + 48
2 CoreFoundation 0x000000010f924449 -[NSException raise] + 9
3 Runner 0x000000010bf4225b -[LocationPermissionStrategy requestPermission:completionHandler:] + 603
4 Runner 0x000000010bf43ad8 -[PermissionManager requestPermissions:completion:] + 632
5 Runner 0x000000010bf432ae -[PermissionHandlerPlugin handleMethodCall:result:] + 1134
6 Flutter 0x000000010c085141 __45-[FlutterMethodChannel setMethodCallHandle<…>

Experienced this issue with vscode.

Solution that worked for me:

  1. delete emulator
  2. create new emulator from vscode interface

Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v' please.
All system setups can be slightly different so it's always better to open new issues and reference related issues.

I had the same problem. Then I upgrade the flutter version with 'flutter upgrade' and it works for me. If you still don't know how to solve it, you can try this out. Hope it helps you.

i had the same problem i solved it by stating app manually when the app is getting installed it kills app and comes back to menu at that time open the app manually so it make the device connection! hope so it will HELP u all. or u can try to use vs code it also solved the problem.

Yes, on Windows, Lost connection to device appears on full-restart (using the green play button in Android Studio). I have also noticed that it does not happen with hot-reloads on saving the files.

i have this error form 2 months i was able to use the hot reload mode i solved this issue is now solved by me just change our mobile charging cable and use usb cable.

Was this page helpful?
0 / 5 - 0 ratings