“Calling this from your main thread can lead to deadlock and/or ANRs while getting accesToken” from GoogleAuthUtil(Google Plus integration in Android)

前端 未结 4 1702
南笙
南笙 2020-12-01 12:27

In my android application, I am trying to get AccessToken from GoogleAuthUtil as below :

accessToken = GoogleAuthUtil.getToken(this, mPlusClient.getAc

4条回答
  •  猫巷女王i
    2020-12-01 13:22

    E/GoogleAuthUtil(4696): java.lang.IllegalStateException: calling this from your main thread can lead to deadlock

    Sounds like you need to do that on a separate thread, have you tried that?

    Here you can find information about threads in Android.

提交回复
热议问题