My app works correctly, but I'm facing the following error:
10-04 14:04:38.182: W/MessageQueue(8625): Handler (android.media.MediaPlayer$EventHandler){416ad6b0} sending message to a Handler on a dead thread
10-04 14:04:38.182: W/MessageQueue(8625): java.lang.RuntimeException: Handler (android.media.MediaPlayer$EventHandler) {416ad6b0} sending message to a Handler on a dead thread
10-04 14:04:38.182: W/MessageQueue(8625): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:196)
10-04 14:04:38.182: W/MessageQueue(8625): at android.os.Handler.sendMessageAtTime(Handler.java:473)
10-04 14:04:38.182: W/MessageQueue(8625): at android.os.Handler.sendMessageDelayed(Handler.java:446)
10-04 14:04:38.182: W/MessageQueue(8625): at android.os.Handler.sendMessage (Handler.java:383)
10-04 14:04:38.182: W/MessageQueue(8625): at android.media.MediaPlayer.postEventFromNative(MediaPlayer.java:1898)
10-04 14:04:38.182: W/MessageQueue(8625): at dalvik.system.NativeStart.run(Native Method)
10-04 14:04:38.182: V/MediaPlayer(8625): back from callback
I already saw this thread and the proposed workaround, but it doesn't work for me.
Anybody has another solution?
// create a handler to post messages to the main thread
Handler mHandler = new Handler(getMainLooper());
mHandler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(), "hello", Toast.LENGTH_SHORT).show();
}
});
Try This Code Hope It helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With