【发布时间】:2020-08-12 13:06:41
【问题描述】:
我们有一个应用程序,我们使用最新版本的 Android 工作管理器 1.00.00 来安排重复工作。工作每 20 分钟运行一次。发布更新后,我们注意到 Google 开发者控制台中出现以下崩溃。
java.lang.IllegalStateException:
at android.os.Parcel.readException (Parcel.java:1691)
at android.os.Parcel.readException (Parcel.java:1636)
at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:158)
at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:42)
at androidx.work.impl.background.systemjob.SystemJobScheduler.scheduleInternal (SystemJobScheduler.java:161)
at androidx.work.impl.background.systemjob.SystemJobScheduler.schedule (SystemJobScheduler.java:128)
at androidx.work.impl.Schedulers.schedule (Schedulers.java:91)
at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:100)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
at java.lang.Thread.run (Thread.java:761)
该错误仅 (100%) 发生在运行 Android 7.0 和 7.1 的设备上。我们无法知道是什么原因造成的,因为堆栈跟踪中没有提到我们的代码。
请注意,我们使用自定义 WorkManager 初始化。另请注意,由于我们尚未收到任何有关崩溃的电子邮件,因此用户可能看不到该错误。
有人知道这是怎么回事吗?
【问题讨论】:
-
只是
diff更新前后的代码... -
我们的代码中没有导致问题的更改。该错误似乎是由特定设备上的错误 JobScheduler 实现引起的。我已经用更多信息回答了这个问题。
标签: android android-workmanager