Android - Facebook login causes onResume error only for first time

假装没事ソ 提交于 2019-12-04 07:36:23
Rahul Parsani

I don't believe that this is an issue with your app. People have been reporting this bug and I just answered a similar question here. Basically Facebook released a new version of their SDK yesterday fixing the onResume NPE crash in their AuthorizationClient. See if upgrading fixes your issue.

According to the change log https://developers.facebook.com/docs/android/change-log-3.x/,
in facebook version 3.5.1 fixed a lot of problems about the authentication and app events logging,so maybe it has been solved in newest one version which can be download from https://github.com/facebook/facebook-android-sdk. I hope it can solve your problem:)

Basically this problem occurs when the calling activity is not live or destroyed. In android the method onActivityResult() is called after login. The Activity is destroyed forcefully by the mobile( Don't keep activities option enables in the developers options settings). Please Once cross check in the developers options setting that the Don't keep activities is enabled or disabled.

Make sure in your manifest that the lgin activity is in portrait. There is an issue with losing the activity if it isn't in portrait..which is very lame...:|

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!