我和一个朋友正在为Android开发一个游戏,我们想在Google游戏服务中加入一些领导板,但是我们不能让登录生效。
我们将使用Google插件的最小示例项目中的脚本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键,从另一台计算机,等等。
发布于 2017-11-14 22:41:23
在playService:https://github.com/playgameservices/play-games-plugin-for-unity/issues/287的“统一游戏”游戏中,也提出并标记了一个类似的问题。
对少数人有效的解决办法可以在这里找到。检查这里提到的步骤? https://github.com/playgameservices/play-games-plugin-for-unity/issues/280#issuecomment-64280552
https://stackoverflow.com/questions/47296169
复制相似问题