【问题标题】:Error creating a GameServices object创建 GameServices 对象时出错
【发布时间】:2015-01-20 20:22:01
【问题描述】:

当尝试对本地用户进行身份验证时,我看到下一个异常发生:

I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: Activating PlayGamesPlatform.
I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform
I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: Creating platform-specific Play Games client.
I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: Creating real IPlayGamesClient

D/GamesUnitySDK(11264): Performing Android initialization of the GPG SDK

I/Unity   (11264): InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK
I/Unity   (11264):   at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.Native.NativeClient.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.PlayGamesLocalUser.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 

来自 GamesNativeSDK 的错误:

E/GamesNativeSDK(11264): Can't register class com/google/android/gms/games/snapshot/SnapshotContents: an exception occurred.
E/GamesNativeSDK(11264): Could not register one or more required Java classes.

这个错误是什么意思,我该如何解决?

我正在使用Google Play Games plugin for Unity 提供的最新版本:

【问题讨论】:

    标签: android plugins unity3d google-play-services google-play-games


    【解决方案1】:

    仅供参考,@mrggl 还说:

    栈溢出线程中引用的错误大多是由 Google Play 服务客户端库的过时版本。 确保您已更新到最新版本,重新运行 在 Google Play 游戏中设置 android,然后重试。

    以防万一出现错误,see the same issue

    【讨论】:

      【解决方案2】:

      https://github.com/playgameservices/play-games-plugin-for-unity/issues/280 部分修复了这个问题。

      @mrggl 说:

      这可能是因为当前插件有 对 libc++_shared.so 的传递依赖 - 就是这样,链接 静态地反对标准库可能会解决这个问题。

      我在这里提交了一个静态链接的 libgpg 版本: https://github.com/playgameservices/play-games-plugin-for-unity/tree/debug_libgpg/debug。 用这些覆盖旧版本的libgpg,看看是否 解决问题!

      【讨论】:

        猜你喜欢
        • 2020-07-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多