Java 谷歌游戏:姜饼w/多个G+帐户>无限登录循环-GameHelper
使用Google Play Game Services示例,如果您使用的姜饼设备具有多个Google帐户,则无法登录。GameHelper无法登录,您将陷入一个无休止的登录屏幕循环 如果打开GameHelper.java并注释掉第417行:meExpectingResolution=false …然后你就可以真正登录了。但这也导致我的游戏崩溃 谷歌Play服务和一个带有示例按钮的新类GameHelper在android 2.3上无法登录到您的帐户。当出现带有用户选择的对话框登录对话框时,该方法将显示在顶部Java 谷歌游戏:姜饼w/多个G+帐户>无限登录循环-GameHelper,java,android,google-play-services,google-play-games,shiva3d,Java,Android,Google Play Services,Google Play Games,Shiva3d,使用Google Play Game Services示例,如果您使用的姜饼设备具有多个Google帐户,则无法登录。GameHelper无法登录,您将陷入一个无休止的登录屏幕循环 如果打开GameHelper.java并注释掉第417行:meExpectingResolution=false …然后你就可以真正登录了。但这也导致我的游戏崩溃 谷歌Play服务和一个带有示例按钮的新类GameHelper在android 2.3上无法登录到您的帐户。当出现带有用户选择的对话框登录对话框时,该方法将
/** Call this method from your Activity's onStop(). */
public void onStop() {
debugLog("onStop");
assertConfigured("onStop");
if (mGoogleApiClient.isConnected()) {
debugLog("Disconnecting client due to onStop");
mGoogleApiClient.disconnect();
} else {
debugLog("Client already disconnected when we got onStop.");
}
mConnecting = false;
mExpectingResolution = false;
// let go of the Activity reference
mActivity = null;
}
选择后,用户将调用onStart。但是,没有登录。相反,“开发”对话框“登录”对话框将根据用户的选择重新出现。无限期地如此
/** Call this method from your Activity's onStart(). */
public void onStart(Activity act) {
mActivity = act;
mAppContext = act.getApplicationContext();
debugLog("onStart");
assertConfigured("onStart");
if (mConnectOnStart) {
if (mGoogleApiClient.isConnected()) {
Log.w(TAG,
"GameHelper: client was already connected on onStart()");
} else {
debugLog("Connecting client.");
mConnecting = true;
mGoogleApiClient.connect();
}
} else {
debugLog("Not attempting to connect becase mConnectOnStart=false");
debugLog("Instead, reporting a sign-in failure.");
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
notifyListener(false);
}
}, 1000);
}
}
GameHelper中的登录循环错误是否有任何修复
源代码在这里:你能至少链接到示例代码吗?更新了我的帖子,谢谢!你也可以发布日志吗?我不知道如何让GameHelper记录任何内容,它有一个布尔值mDebugLog,但设置为true仍然不会显示任何日志。与你的问题不一样,但可能会有所帮助。向下滚动到有多个G+帐户问题的人。