Flutter: 与设备的连接断开

创建于 2018-09-26  ·  29评论  ·  资料来源: flutter/flutter

调试器有时会断开与仿真器的连接,即使没有进行热重装也是如此。
这些是logcat输出:

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<strong i="8">@f8d9306</strong> 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<strong i="9">@a24fb01</strong> new=android.app.Application<strong i="10">@a24fb01</strong>
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

最有用的评论

@zoechi
我的结论:7 MB的gif动画在抖动中会占用大约1 GB的内存。
因此,操作系统会在内存不足的情况下终止该应用程序。

所有29条评论

请添加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.

这是从更新开始还是在旧版本中也看到了?

@zoechi我在以前的版本和当前版本中都看到了这一点。
在应用程序中启动浏览器时,我也可以看到这一点。
launch(“ url”);

这是由于内存不足吗?

我在小部件上使用了4个gif动画

仿真器规格:
公羊:1536
虚拟机堆:256

@zoechi
profiler

动态GIF铃声
我发现https://github.com/flutter/flutter/issues/9707#issuecomment -421735556

嗯,这是我记得看到https://github.com/flutter/flutter/issues/20998#issuecomment -420101036
但这是关于iOS的

是的,在Windows上, Lost connection to device在完全重新启动时显示(使用Android Studio中的绿色播放按钮)。 我还注意到在保存文件时进行热重装不会发生这种情况。

提及动画的大小总计约为7 MB可能会有所帮助。

@zoechi我在2个三星设备上发布并测试了该应用程序,但它没有崩溃,
这只是在模拟器和Windows上崩溃。

@zoechi
内存较低的较旧设备上进行了测试,
该应用程序崩溃了

@zoechi
我的结论:7 MB的gif动画在抖动中会占用大约1 GB的内存。
因此,操作系统会在内存不足的情况下终止该应用程序。

我遇到了同样的问题。 该应用程序最初在模拟器上运行良好,但是,当我更新抖动时,出现“设备失去连接”错误。 扑医生说没发现问题!

我有同样的问题。 然后我切换到另一个仿真器可以再次工作,但是然后我完全重启就遇到了同样的问题。

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)

今天创建了新的flutter项目之后,我也遇到了同样的问题。 我的flutter版本是1.5.4-hotfix.2,我有几个老的项目都运行良好。 检查过的医生-v获得“未发现问题”。

对于我来说,也出现了1.5.4-hotfix.2 ,无论是VS Code还是flutter run 。 此刻每次都持续发生,因此无法调试我的应用程序app

日志的最后一部分:

[ +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: <strong i="9">@Isolate</strong>, 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

和我一样。

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

日志的最后一部分:

[   +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.

就我而言,它是通过以下方式解决的:
https://github.com/flutter/flutter/issues/35102#issuecomment -505952116

您可以检查stackoverflow答案。 这可以解决您的问题
Flutter:热重装后出现“与设备的连接丢失”错误

我在这里遇到同样的问题...我在应用程序的背景中显示了gif,几秒钟后导致应用程序崩溃

嗨@ p30arena
您是否还在使用最新稳定版本的flutter遇到此问题?
谢谢

嗨! 我仍然在Flutter 1.12修补程序7上面临该问题! 请尽快为我提供解决方案。

不幸的是,如果没有其他信息,我们不确定如何解决此问题。 因此,我们暂时不愿意关闭此错误。 如果您有更多关于我们的信息,请不要犹豫,对该错误进行评论; 我们将立即重新打开它!
感谢您的贡献。

能否仍然存在此问题的每个人都请提出一个新的问题,并提供确切的描述,发生的情况,日志以及“ flutter doctor -v”的输出。
所有系统设置都可能略有不同,因此最好打开新问题并参考相关问题。

@iapicca
嗨!
在对代码进行了十几次更新后,该应用程序有时会崩溃,但是我最近没有遇到过此问题。

在92毫秒内重新加载了682个库中的0个。
与设备的连接断开。
*首先抛出调用堆栈:

0 CoreFoundation 0x000000010f9248db __exceptionPreprocess + 331
1个libobjc.A.dylib 0x000000010e7d9ac5 objc_exception_throw + 48
2 CoreFoundation 0x000000010f924449-[NSException提高] + 9
3 Runner 0x000000010bf4225b-[LocationPermissionStrategy requestP ermission:completionHandler :] + 603
4 Runner 0x000000010bf43ad8-[PermissionManager requestPe rmissions:completion :] + 632
5转轮0x000000010bf432ae-[PermissionHandler插件handleM ethodCall:result :] + 1134
6 Flutter 0x000000010c085141 __45- [FlutterMethodChannel setMethodCallHandle <…>

vscode遇到了这个问题。

适用于我的解决方案:

  1. 删除模拟器
  2. 从vscode界面创建新的模拟器

能否仍然存在此问题的每个人都请提出一个新的问题,并提供确切的描述,发生的情况,日志以及“ flutter doctor -v”的输出。
所有系统设置都可能略有不同,因此最好打开新问题并参考相关问题。

我有同样的问题。 然后我用“ flutter upgrade”升级Flutter版本,它对我有用。 如果您仍然不知道如何解决,可以尝试一下。 希望对您有帮助。

我遇到了同样的问题,我通过在安装应用程序时手动说明该应用程序来解决该问题,该应用程序杀死了该应用程序,并在此时返回菜单,手动打开该应用程序即可与设备建立连接! 希望它会帮助大家。 或者您可以尝试使用vs代码,这也解决了问题。

是的,在Windows上, Lost connection to device在完全重新启动时显示(使用Android Studio中的绿色播放按钮)。 我还注意到在保存文件时进行热重装不会发生这种情况。

我有这个错误表格2个月,我能够使用热重载模式,但现在我解决了此问题,只需更换移动充电电缆并使用USB电缆即可。

此页面是否有帮助?
0 / 5 - 0 等级