将RecyclerView库从23.3.0更新到24.2.0后,得到java.util.concurrent.RejectedExecutionException错误

时间:2016-08-18 11:06:02

标签: android android-recyclerview android-support-library

我在我的应用程序周围使用了几个RecyclerView。我想更新支持库我已经使用了23.3.0到24.2.0并且突然应用程序开始因java.util.concurrent.RejectedExecutionException错误而崩溃。 堆栈跟踪指向我的基本活动类onResume方法。 这是堆栈跟踪:

无法提交事件任务

java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@ac47c5f rejected from java.util.concurrent.ScheduledThreadPoolExecutor@40816ac[Shutting down, pool size = 1, active threads = 0, queued tasks = 1, completed tasks = 5]
                                                       at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
                                                       at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
                                                       at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:298)
                                                       at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:503)
                                                       at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:602)
                                                       at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:593)
                                                       at com.crashlytics.android.answers.AnswersEventsHandler.executeAsync(AnswersEventsHandler.java:182)
                                                       at com.crashlytics.android.answers.AnswersEventsHandler.processEvent(AnswersEventsHandler.java:168)
                                                       at com.crashlytics.android.answers.AnswersEventsHandler.processEventAsync(AnswersEventsHandler.java:44)
                                                       at com.crashlytics.android.answers.SessionAnalyticsManager.onLifecycle(SessionAnalyticsManager.java:128)
                                                       at com.crashlytics.android.answers.AnswersLifecycleCallbacks.onActivityStarted(AnswersLifecycleCallbacks.java:26)
                                                       at io.fabric.sdk.android.ActivityLifecycleManager$ActivityLifecycleCallbacksWrapper$1.onActivityStarted(ActivityLifecycleManager.java:111)
                                                       at android.app.Application.dispatchActivityStarted(Application.java:223)
                                                       at android.app.Activity.onStart(Activity.java:1245)
                                                       at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:592)
                                                       at com.myApp.base.BaseActivity.onStart(BaseActivity.java:173)
                                                       at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1234)
                                                       at android.app.Activity.performStart(Activity.java:6329)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
                                                       at android.app.ActivityThread.access$900(ActivityThread.java:177)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:145)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5951)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

这是我的build.gradle sdk版本

compileSdkVersion 24
buildToolsVersion '22.0.1'
dataBinding {
    enabled = true
}
defaultConfig {
    minSdkVersion 14
    targetSdkVersion 22
    multiDexEnabled true
}

和谷歌相关的依赖

compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-appindexing:8.3.0'
compile 'com.google.android.gms:play-services-plus:8.3.0'

你知道我为什么会遇到这个问题吗?

0 个答案:

没有答案