2
我一直在爲我的遊戲使用Google Play遊戲服務的多人遊戲功能,最近我無法再創建一個房間。無法用Google Play遊戲服務創建空間
我已經很長時間沒有觸及這部分代碼,所以我不明白是什麼導致它失敗。我正在測試Nexus 4和Motorola Razr,兩者都通過Wifi連接到互聯網。
首先我使用Google+登錄並調用onSignInSucceeded()。然後我把這段代碼:
public void startQuickMatch() {
// quick-start a game with 1 to 3 randomly selected opponents
final int MIN_OPPONENTS = 1, MAX_OPPONENTS = 3;
Bundle autoMatchCriteria = RoomConfig.createAutoMatchCriteria(MIN_OPPONENTS, MAX_OPPONENTS, 0);
//Bundle autoMatchCriteria = RoomConfig.createAutoMatchCriteria(2, 2, 0);
RoomConfig.Builder rtmConfigBuilder = RoomConfig.builder(this);
rtmConfigBuilder.setMessageReceivedListener(this);
rtmConfigBuilder.setRoomStatusUpdateListener(this);
rtmConfigBuilder.setAutoMatchCriteria(autoMatchCriteria);
//keepScreenOn();
getGamesClient().createRoom(rtmConfigBuilder.build());
Log.d(TAG, "createRoom called");
}
但不是創建房間,並把我在候診室裏,我得到這些日誌不幫我,因爲他們都不清楚,我和他們能在谷歌上找不到。
06-24 13:10:34.366: D/SuperNinjaRun(29402): createRoom called
06-24 13:10:34.376: E/DataConnectionManager(21359): tearDown() called when network is NOT ready for match !
06-24 13:10:34.426: I/libjingle(21359): Token type:OAuth2
06-24 13:10:34.426: I/libjingle(21359): Final XMPP server hostname talk.google.com port to 5222
06-24 13:10:34.436: D/games_rtmp:Libjingle(21359): Release: call nativeRelease
06-24 13:10:34.436: W/RealTimeAndroidService(21359): Could not prepare network for the room.
06-24 13:10:34.496: W/InputMethodManagerService(551): Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
06-24 13:10:34.776: I/libjingle(21359): OpenSSLAdapter::OnConnectEvent
06-24 13:10:34.976: I/libjingle(21359): BeginSSL: gmail.com
06-24 13:10:35.797: I/libjingle(21359): Starting Jingle info task.
06-24 13:10:35.797: I/libjingle(21359): IbbDataTask::ProcessStart() called:
06-24 13:10:35.807: I/libjingle(21359): ProcessStart()::Sending Jingle info stanza.
06-24 13:10:35.907: I/libjingle(21359): OnJingleInfo called. Setting relay/stun hosts.
06-24 13:10:36.928: E/libjingle(21359): Error(libjingleclient.cpp:232): Exiting with unfinished tasks.
06-24 13:10:36.928: I/libjingle(21359): Cleanup
,有時它也給了我這些日誌幾秒鐘後:
06-24 13:30:48.043: E/Volley(1165): [80] il.a: Unexpected response code 400 for https://www.googleapis.com/games/v1whitelisted/applications?language=en_US&platformType=ANDROID
06-24 13:30:48.043: E/GameAgent(1165): Unable to retrieve applications from network
06-24 13:30:48.043: I/GameAgent(1165): {"code":400,"errors":[{"message":"Invalid applicationId with value ReplaceMe.","domain":"global","reason":"invalid"}]}
06-24 13:30:48.103: D/SyncManager(531): failed sync operation [email protected] u0 (com.google), com.google.android.gms.games, USER, earliestRunTime 28048, SyncResult: stats [ numIoExceptions: 1]
任何人有那裏的問題可能來自一個想法?