在IntentService中使用Facebook GraphRequest时,在死线程上向处理程序发送消息

时间:2016-03-06 04:56:19

标签: java android multithreading facebook android-asynctask

我在IntentService中调用了一个Facebook GraphRequest(....),最终出现了以下错误:

logcat的:

  

W / MessageQueue:处理程序(android.os.Handler){15237a6e}发送   在死线程上向处理程序发送消息                                                                               java.lang.IllegalStateException:Handler(android.os.Handler)   {15237a6e}在死线程上向处理程序发送消息                                                                                   在android.os.MessageQueue.enqueueMessage(MessageQueue.java:325)                                                                                   在android.os.Handler.enqueueMessage(Handler.java:631)                                                                                   在android.os.Handler.sendMessageAtTime(Handler.java:600)                                                                                   在android.os.Handler.sendMessageDelayed(Handler.java:570)                                                                                   在android.os.Handler.post(Handler.java:326)                                                                                   在com.facebook.GraphRequest.runCallbacks(GraphRequest.java:1395)                                                                                   在   com.facebook.GraphRequest.executeConnectionAndWait(GraphRequest.java:1279)                                                                                   在   com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1164)                                                                                   在   com.facebook.GraphRequestBatch.executeAndWaitImpl(GraphRequestBatch.java:252)                                                                                   在   com.facebook.GraphRequestBatch.executeAndWait(GraphRequestBatch.java:201)                                                                                   在   com.facebook.GraphRequestAsyncTask.doInBackground(GraphRequestAsyncTask.java:169)                                                                                   在   com.facebook.GraphRequestAsyncTask.doInBackground(GraphRequestAsyncTask.java:37)                                                                                   在android.os.AsyncTask $ 2.call(AsyncTask.java:288)                                                                                   在java.util.concurrent.FutureTask.run(FutureTask.java:237)                                                                                   在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)                                                                                   在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:587)                                                                                   在java.lang.Thread.run(Thread.java:818)

错误的原因是什么以及如何解决?

0 个答案:

没有答案