shared_preference 中的问题:^2.0.3直到现在 10-03-2021

问题描述

更新 Flutter 后,我的一个项目出现问题。错误日志如下。主要问题是偏好没有完美地保存在设备上。一些偏好是保存和一些离开。我从 Fluttersharedprefs.xml 中检查了它

E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at io.Flutter.plugins.sharedpreferences.MethodCallHandlerImpl.commitAsync(MethodCallHandlerImpl.java:137)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at io.Flutter.plugins.sharedpreferences.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:96)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at io.Flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at io.Flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at io.Flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at android.os.MessageQueue.next(MessageQueue.java:340)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at android.app.ActivityThread.main(ActivityThread.java:7853)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)
E/MethodChannel#plugins.Flutter.io/shared_preferences( 9295):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
E/Flutter ( 9295): [ERROR:Flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(error,Task io.Flutter.plugins.sharedpreferences.MethodCallHandlerImpl$1@d8dbf46 rejected from java.util.concurrent.ThreadPoolExecutor@6e10313[Running,pool size = 1,active threads = 1,queued tasks = 0,completed tasks = 14],null,java.util.concurrent.RejectedExecutionException: Task io.Flutter.plugins.sharedpreferences.MethodCallHandlerImpl$1@d8dbf46 rejected from java.util.concurrent.ThreadPoolExecutor@6e10313[Running,completed tasks = 14]

有很多日志,但是由于stackoverflow的空间问题,我写不出来......

解决方法

我建议您按照以下说明在官方 Flutter 存储库中向 Flutter 团队提交错误报告:https://github.com/flutter/plugins#issues

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...