更新颤振后,我的一个项目出现问题。错误日志如下。主要问题是偏好不能完美地保存在设备上。一些首选项被保存,一些离开。我从 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, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 14]
有很多日志,但是由于stackoverflow的空间问题,我无法编写它....