Google game services sign in issue (fails first attempt, successful second)

99封情书 提交于 2019-11-29 14:11:57

Figured it out! It ended up being a stupid mistake!

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    // mGameHelper.onActivityResult(requestCode, requestCode, data); // before - broken
    mGameHelper.onActivityResult(requestCode, resultCode, data); // after - working! \o/
}

See the difference? (hint: second parameter of mGameHelper.onActivityResult)

For the benefit of others hitting this in the future, the following logs, though may indicate other errors, do not appear to affect the log in process - or game services in general - my leaderboard is working :)

E/GooglePlayServicesUtil(10033): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
From my debugging, this has to do with using AdMob and Google Play services. Chances are AdMob is attempting to get location based info (all other Google searches for the above error leads to Maps related questions)

E/dalvikvm(10100): Could not find class 'android.app.AppOpsManager', referenced from method axp.a
Not sure what this error is. android.app.AppOpsManager appears to be an class added in API v19 (AppOpsManager in Android Developer). I changed my SDK to use API v19, but still get this error. Quick skim of docs indicate it also has location related functionality (possibly AdMob again - don't think I saw this when I disabled AdMob)

Did you activate activate the api at this link: https://console.developers.google.com/project ?

the app must be signed with the same file and uploaded to phone and g play as beta, in order to work google services

I removed this line from GameHelper onStop method.

//mExpectingResolution = false.

its worked for me

https://code.google.com/p/play-games-platform/issues/detail?id=98

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