3

This is my function to quickGame

Bundle autoMatchCriteria = RoomConfig.createAutoMatchCriteria(1, 1, 0);
RoomConfig.Builder rtmConfigBuilder = RoomConfig.builder(this);
rtmConfigBuilder.setMessageReceivedListener(this);
rtmConfigBuilder.setRoomStatusUpdateListener(this);
rtmConfigBuilder.setAutoMatchCriteria(autoMatchCriteria);
switchToScreen(R.id.screen_wait);
//keepScreenOn();
//resetGameVars();
getGamesClient().createRoom(rtmConfigBuilder.build());

and onRoomCreated where game stops

@Override
    public void onRoomCreated(int statusCode, Room room) {
        Log.d(TAG, "onRoomCreated(" + statusCode + ", " + room + ")");
        if (statusCode != GamesClient.STATUS_OK) {
            Log.e(TAG, "*** Error: onRoomCreated, status " + statusCode);
            showGameError();
            return;
        }
        showWaitingRoom(room);
    }

Im getting statusCode = 7000 which is STATUS_REAL_TIME_CONNECTION_FAILED, and room = null so i think problem is in quickGame function.

D/Multiplayer(24221): Sign-in succeeded.
D/Multiplayer(24221): GameHelper: onActivityResult: req=10001, resp=RESULT_CANCELED
D/Multiplayer(24221): GameHelper: onActivityResult: request code not meant for us. Ignoring.
W/Multiplayer(24221): *** invitation inbox UI cancelled, 0
D/Multiplayer(24221): GameHelper: onActivityResult: req=10000, resp=RESULT_OK
D/Multiplayer(24221): GameHelper: onActivityResult: request code not meant for us. Ignoring.
D/Multiplayer(24221): Select players UI succeeded.
D/Multiplayer(24221): Invitee count: 1
D/Multiplayer(24221): Creating room...
D/Multiplayer(24221): Room created, waiting for it to be ready...
D/Multiplayer(24221): onRoomCreated(7000, null)
E/Multiplayer(24221): *** Error: onRoomCreated, status 7000
W/ResourceType(24221): getEntry failing because entryIndex 13 is beyond type entryCount 1
W/ResourceType(24221): Failure getting entry for 0x7f0b000d (t=10 e=13) in package 0 (error -2147483647)
E/GooglePlayServicesUtil(24221): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
W/PicturePileLayerContent(24221): Warning: painting PicturePile without content!
W/PicturePileLayerContent(24221): Warning: painting PicturePile without content!
W/PicturePileLayerContent(24221): Warning: painting PicturePile without content!

Im comparing my source code with google example, but no effects I've Google Play Services 4.0 on tablet and latest sdk

4

3 回答 3

1

您是否在 Google Play 开发者控制台中开启了多人游戏?

启用多人游戏支持

要集成游戏服务多人游戏支持,例如玩家匹配,您必须启用多人游戏设置。目前,仅支持 Android 实时多人游戏。

要启用多人游戏:

从 Google Play 开发者控制台打开带有游戏服务的游戏页面,然后选择您的游戏。打开游戏的链接应用页面,然后将多人游戏设置切换为开启。单击另存为草稿以存储您的设置。

来源:https ://developers.google.com/games/services/console/configuring#enabling_multiplayer_support

于 2013-11-14T22:42:37.910 回答
0

只是想让你知道-我弄清楚我的问题是什么..好吧..

事实证明,就我而言,问题出在 AdMob 上——它最初是作为一个单独的库集成的,当我将 GooglePlus 添加到游戏中时,开始在控制台中看到很多东西。

我很困惑,问题出在 GooglePlus(抛出您看到的有关缺少资源的消息) - 但正是 AdMob 部分正在这样做。

尽管如此,即使在弄清楚这一点之后,GooglePlus 操作也无法正常工作。

最奇怪的是它们可以在旧的 HTC Sense (2.2) 下工作,但不能在任何 4.x 设备上工作。

我只是把整件事都撕掉了——在里面丢了两天……一个+1按钮。

于 2013-11-08T13:24:49.700 回答
0

我从互联网上安装了 google play services.apk,这就是原因。我等待来自 Google Play 的更新,现在一切正常 :)

于 2013-11-29T21:20:18.370 回答