DeadObjectException with com.google.android.gms

后端 未结 1 413
挽巷
挽巷 2021-01-04 06:09

I\'m getting a frequent crash with the log below. It doesn\'t reference my application code but I\'m guessing it may have something to do with GoogleApiClient connecting/dis

相关标签:
1条回答
  • 2021-01-04 06:57

    This seems related to handlers and message passing...Based on below snippet from your stack trace, gms is seeing a DeadObjectException when trying to process a message on the looper. Even though the stack trace shows gms related, it could have be triggered by your code.

       at com.google.android.gms.internal.q$a.handleMessage(Unknown Source)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
    

    This exception is seen if the message its trying to access belong to a process that has since exited/killed. Do a code search for all handler sendMessage* message dispatch calls, through out your code. Even this may not catch all instances as some gms calls could result in handler message dispatches.

    Also, check if any of your background services, or activities that allocated handler messages, are exiting. Android could be destroying them depending on life cycle states, try overriding onDestroy.

    In all your activities/services, any where you make calls to gms api, check the objects you create and pass to gms; If they die, those objects are not valid any more.

    0 讨论(0)
提交回复
热议问题