【问题标题】:I don't know why my device keeps disconnecting in flutter我不知道为什么我的设备总是在颤抖中断开连接
【发布时间】:2022-01-21 21:36:27
【问题描述】:
I/utter_travelin(31159): Clamp target GC heap from 53MB to 48MB
I/utter_travelin(31159): Forcing collection of SoftReferences for 64KB allocation
I/utter_travelin(31159): Starting a blocking GC Alloc
I/utter_travelin(31159): Clamp target GC heap from 53MB to 48MB
I/utter_travelin(31159): Alloc concurrent copying GC freed 20(712B) AllocSpace objects, 0(0B) LOS objects, 0% free, 47MB/48MB, paused 5us total 7.039ms
I/utter_travelin(31159): WaitForGcToComplete blocked Background on HeapTrim for 6.238ms
W/utter_travelin(31159): Throwing OutOfMemoryError "Failed to allocate a 65552 byte allocation with 53984 free bytes and 52KB until OOM, target footprint 50331648, growth limit 50331648" (VmSize 9934428 kB)
E/AndroidRuntime(31159): FATAL EXCEPTION: pool-1-thread-1
E/AndroidRuntime(31159): Process: com.example.flutter_traveling, PID: 31159
E/AndroidRuntime(31159): java.lang.OutOfMemoryError: Failed to allocate a 65552 byte allocation with 53984 free bytes and 52KB until OOM, target footprint 50331648, growth limit 50331648
E/AndroidRuntime(31159):    at com.android.internal.util.FastXmlSerializer.<init>(FastXmlSerializer.java:86)
E/AndroidRuntime(31159):    at com.android.internal.util.FastXmlSerializer.<init>(FastXmlSerializer.java:75)
E/AndroidRuntime(31159):    at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:195)
E/AndroidRuntime(31159):    at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:778)
E/AndroidRuntime(31159):    at android.app.SharedPreferencesImpl.access$900(SharedPreferencesImpl.java:55)
E/AndroidRuntime(31159):    at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:647)
E/AndroidRuntime(31159):    at android.app.SharedPreferencesImpl.enqueueDiskWrite(SharedPreferencesImpl.java:666)
E/AndroidRuntime(31159):    at android.app.SharedPreferencesImpl.access$100(SharedPreferencesImpl.java:55)
E/AndroidRuntime(31159):    at android.app.SharedPreferencesImpl$EditorImpl.commit(SharedPreferencesImpl.java:585)
E/AndroidRuntime(31159):    at io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl$1.run(MethodCallHandlerImpl.java:143)
E/AndroidRuntime(31159):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(31159):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(31159):    at java.lang.Thread.run(Thread.java:919)
I/utter_travelin(31159): Clamp target GC heap from 53MB to 48MB
W/System  (31159): A resource failed to call close.
I/Process (31159): Sending signal. PID: 31159 SIG: 9
Lost connection to device.
Exited (sigterm)

设备总是与flutter断开连接,我不知道为什么,请帮助 在Android模拟器中,这种现象不断出现,而在ios中,则没有任何问题。

【问题讨论】:

  • 有时当你的模拟器的磁盘空间不足时会发生这种情况。腾出一些可用的磁盘空间可能会解决这个问题

标签: android flutter


【解决方案1】:

错误日志显示

抛出 OutOfMemoryError

如果您在模拟器上运行项目,请清理它或卸载您的应用。

【讨论】:

    猜你喜欢
    • 2022-01-03
    • 1970-01-01
    • 2020-06-16
    • 2014-07-17
    • 2021-03-28
    • 1970-01-01
    • 2015-07-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多