这是我对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());以及游戏停止的onRoomCreated
@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);
}我得到了statusCode = 7000,也就是STATUS_REAL_TIME_CONNECTION_FAILED,和room = null,所以我认为问题在quickGame函数中。
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!我将我的源代码与google示例进行比较,但我在平板电脑和最新的sdk上没有Google Play Services 4.0的效果。
发布于 2013-11-29 21:20:18
我在互联网上安装了google services.apk,这就是原因所在。我在等待Google Play的更新,现在一切都正常了:)
发布于 2013-11-14 22:42:37
你在Google Play Developer控制台上打开多人游戏了吗?
支持多人支持 若要集成游戏服务多人支持(如玩家匹配),必须启用多人设置。目前,只支持Android的实时多人游戏。 要启用多人游戏: 从Google开发者控制台打开“游戏与游戏服务”页面,然后选择您的游戏。打开游戏的链接应用程序页面,然后切换多玩家设置为ON。单击“另存为草稿”以存储设置。
来源:support
发布于 2013-11-08 13:24:49
只是想让你知道-我知道我的问题是什么..。嗯,有点..。
事实证明,在我的例子中,问题在于AdMob --它最初是作为一个单独的库集成的,当我将GooglePlus添加到游戏中时,开始在控制台中看到很多东西。
我感到困惑的是,问题是GooglePlus (抛出您正在看到的关于丢失资源的消息)--但是正是AdMob部分在执行这个任务。
然而,即使在计算出这一点之后,GooglePlus操作也不起作用。
最奇怪的是,它们在旧的HTC感知(2.2)下工作,而不是在任何4.x设备上工作。
我刚把整件事撕了--在里面损失了两天.一个+1的按钮。
https://stackoverflow.com/questions/19737805
复制相似问题