Skip to content Skip to sidebar Skip to footer

Android Gcm Sometimes App Crashes Because Com.google.android.gms.gcm.gcmlistenerservice Is Rejected From Java.util.concurrent.threadpoolexecutor

since I upgraded GCM to 8.4.0 my app sometimes crashes and the log shows the following exception: Fatal Exception: java.lang.RuntimeException: Unable to start service com.myapp.app

Solution 1:

AsyncTask's THREAD_POOL_EXECUTOR has a hard-coded limit of 128 tasks queued. Your problem is that you are executing a lot of tasks on that executor.

If you are not directly calling executeOnExecutor on any of your AsyncTasks, the most likely culprit are third-party methods that return a ListenableFuture, especially those performing network operations. You'll probably want a way to execute those serially. Moving all of those operations into AsyncTasks executing on AsyncTask.SERIAL_EXECUTOR would be one solution.

Post a Comment for "Android Gcm Sometimes App Crashes Because Com.google.android.gms.gcm.gcmlistenerservice Is Rejected From Java.util.concurrent.threadpoolexecutor"