gpt4 book ai didi

android - 显示原生广告时出现 java.util.concurrent.RejectedExecutionException

转载 作者:行者123 更新时间:2023-11-30 00:23:25 25 4
gpt4 key购买 nike

我在我的 Feed 中展示来自受众网络的原生广告。我在下面崩溃了。任何人都知道如何解决它是什么原因造成的?

Fatal Exception: java.util.concurrent.RejectedExecutionException: Task android.os.AsyncTask$3@2c45c538 rejected from java.util.concurrent.ThreadPoolExecutor@1d1c3911[Running, pool size = 9, active threads = 9, queued tasks = 128, completed tasks = 757] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:594) at com.facebook.ads.internal.util.g.a(Unknown Source) at com.facebook.ads.internal.e.d.a(Unknown Source) at com.facebook.ads.internal.e.d.a(Unknown Source) at com.facebook.ads.internal.g.g.a(Unknown Source) at com.facebook.ads.internal.g.g.c(Unknown Source) at com.facebook.ads.internal.util.ak.j(Unknown Source) at com.facebook.ads.internal.util.ad$6.a(Unknown Source) at com.facebook.ads.internal.util.ad$6.a(Unknown Source) at com.facebook.ads.internal.g.r.b(Unknown Source) at com.facebook.ads.internal.g.r.a(Unknown Source) at com.facebook.ads.internal.view.o.a(Unknown Source) at com.facebook.ads.internal.view.d.c.b.setVideoState(Unknown Source) at com.facebook.ads.internal.view.d.c.b.onCompletion(Unknown Source) at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:3392) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:7007) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

最佳答案

您的代码和库中的代码同时启动了太多 AsyncTask 实例。默认的 ThreadPoolExecutor 有一个 128 元素的队列,与正在执行的实例一起使用。您已超出此队列的容量。

关于android - 显示原生广告时出现 java.util.concurrent.RejectedExecutionException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45864999/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com