DllNotFoundException:gpg

时间:2017-11-14 22:17:35

标签: android unity3d google-play-games

一位朋友和我正在使用Unity for Android开发游戏,我们希望在Google Play游戏服务中加入一些排行榜,但我们无法让登录工作。

我们正在使用Google Play游戏插件的最小示例项目登录脚本MainGui。当我们按下身份验证按钮时,它会一直说“身份验证”:

if (!Social.localUser.authenticated)
        {
            // Authenticate
            mWaitingForAuth = true;
            mStatusText = "Authenticating...";
            Social.localUser.Authenticate((bool success) =>
            {
                mWaitingForAuth = false;
                if (success)
                {
                    mStatusText = "Welcome " + Social.localUser.userName;
                }
                else
                {
                    mStatusText = "Authentication failed.";
                }
            });
        }

查看logcat,出现错误:

E/Unity: DllNotFoundException: gpg
at (wrapper managed-to-native) GooglePlayGames.Native.Cwrapper.Builder:GameServices_Builder_Construct ()
at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Create () [0x00000] in <filename unknown>:0 
at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in <filename unknown>:0 
at GooglePlayGames.Native.NativeClient.Authenticate (System.Action`2 callback, Boolean silent) [0x00000] in <filename unknown>:0 
at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`2 callback, Boolean silent) [0x00000] in <filename unknown>:0 
at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 
at GooglePlayGames.PlayGamesLocalUser.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 
at LogInAndroid.OnGUI () [0x00000] in <filename unknown>:0 

我们一直在搜索数小时并尝试其他答案以及删除并重新添加插件到项目,检查api密钥,从其他计算机构建等。

1 个答案:

答案 0 :(得分:0)

类似的问题在playService的play-games-for-unity-repo中被提出并标记为关闭:https://github.com/playgameservices/play-games-plugin-for-unity/issues/287

  

可以在这里找到适用于少数人的解决方案。检查这里提到的步骤?

     

https://github.com/playgameservices/play-games-plugin-for-unity/issues/280#issuecomment-64280552