【问题标题】:Google Play real-time multiplayer does not work on a Genymotion virtual deviceGoogle Play 实时多人游戏无法在 Genymotion 虚拟设备上运行
【发布时间】:2016-02-12 15:35:33
【问题描述】:

我有一个带有 Google Play 成就和排行榜服务的 Android 应用。 我想添加实时多人游戏。 所以我从Github 下载了 ButtonClicker2000 示例并将其链接到我现有的游戏服务

此应用在物理设备上运行良好,但在 Genymotion 设备上尝试创建 Room 在回调 onRoomCreated 中返回状态代码 7000。

// Called when room has been created
@Override
public void onRoomCreated(int statusCode, Room room) {
    Log.d(TAG, "onRoomCreated(" + statusCode + ", " + room + ")");
    if (statusCode != GamesStatusCodes.STATUS_OK) {
        Log.e(TAG, "*** Error: onRoomCreated, status " + statusCode);
        showGameError();
        return;
    }

   // save room ID so we can leave cleanly before the game starts.
    mRoomId = room.getRoomId();

    // show the waiting room UI
    showWaitingRoom(room);
}

状态码 7000 值为: STATUS_REAL_TIME_CONNECTION_FAILED - 无法初始化实时房间的网络连接。

在开发者控制台上打开/关闭实时多人开关不会改变结果。

我不保证多人游戏可以在 Genymotion 上运行。我没有在 stackoverflow 上找到任何明确的确认。

Genymotion 版本 2.6.0 修订版 20151127-3674435
设备:Google Nexus S 4.1.1
Google Play 服务版本:8.4.89 (2428711-070)
GApps:gapps-jb-20121011-signed.zip

如果有人在 Genymotion 上运行实时多人游戏,请回答。
谢谢。

【问题讨论】:

    标签: android genymotion multiplayer


    【解决方案1】:

    我正在 genymotion 设备上运行我的多人游戏。我正在使用与您相同的规格。不幸的是,我有时会收到一个错误(状态代码 4,今天第一次状态代码 7000)。但是,大多数时候它都有效。我遵循了本教程:SO-Thread。 您是否更改了代码,例如 onstart()、.connect 或 .create 调用?

    【讨论】:

    • 好消息是它有效。我没有更改示例代码中的任何内容。您是否更改了任何内容(例如网络设置)?
    • 不,我没有更改任何网络设置。我正在使用带有 API 16 的自定义手机。不要忘记只连接具有不同 gmail 帐户的设备。
    猜你喜欢
    • 1970-01-01
    • 2016-06-24
    • 2014-03-08
    • 1970-01-01
    • 2018-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多