GPG服务不起作用
它显示了本机GPG窗口,但是当它关闭时,PlayGamesPlatform.Instance.Authenticate()回调返回NetworkError
在Google控制台:创建了“游戏服务”。
H 111的gmail帐户,点击发布。H 212F 213
在Google中:
keys)
”中创建任何)。
在团结中:
https://github.com/playgameservices/play-games-plugin-for-unity
。
测试构建与Google上发布的应用程序使用相同的公司名称和产品名称签署的密钥相同
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
.RequestIdToken()
.Build();
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.Activate();
PlayGamesPlatform.Instance.Authenticate(SignInInteractivity.CanPromptAlways, ((SignInStatus status) =>
{
if (status == SignInStatus.Success)
{
print( $"Welcome {PlayGamesPlatform.Instance.GetUserDisplayName()}\n");
}
else
{
print($"Fail:{status}");
}
}));关于Unty控制台的调试
<i>AndroidPlayer(ADB@127.0.0.1:34999)</i> Returning an error code.
#0 0x443df5a (libunity.so) GetStacktrace(int) 0x25
#1 0x4e788b6 (libunity.so) DebugStringToFile(DebugStringToFileData const&) 0x169
#2 0x49875fe (libunity.so) DebugLogHandler::Internal_Log(LogType, LogOption, core::basic_string<char, core::StringStorageDefault<char> >, Object*) 0x65
#3 0x498754e (libunity.so) DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*) 0xb5发布于 2020-04-21 23:20:14
我刚看到这个。我也犯了同样的错误。为了解决这个问题,我在项目设置中减少了字节码的剥离。当我检查统一开发人员控制台时,我注意到错误,指出我的游戏找不到GooglePlayGames的库。
虽然这不是理想的解决办法,但这是一个暂时的解决办法。理想的解决方法是创建一个Link.xml文件,告诉编译器不要删除库.so文件。(我现在正在寻找这个问题,以及我是如何遇到你的问题的。)
发布于 2021-11-22 21:51:45
我偶然发现这篇文章的时候,我试图自己找到答案,现在我知道答案了,我想我应该把它加在这里.所以当我下次忘记该怎么做时,我就会发现它。正如@CherryCoke所说,这个问题是由缩小造成的。
可以在这里找到解决方案:https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/README.md#decreasing-apk-size
您有两个选项:要么关闭小型化,要么告诉细化过程在进行缩小时忽略什么。
如果您想缩小您的构建(对于我来说发布版本是有意义的),那么您可以通过在Player Settings中Android构建的发布设置区域中选择“自定义保护文件”来做到这一点。

一旦您将其添加到其中,您将需要更新指定的pro保密user.txt文件。路径显示在“自定义保护文件”下。
对于google服务,您需要添加的条目可以在:https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/scripts/proguard.txt中找到。
https://stackoverflow.com/questions/61013678
复制相似问题