android - 导入后强制解析时无法使用 google play 服务 “Failed to fetch the following dependencies: com.google.games:gpgs-plugin-support:X”

标签 android unity3d google-play-services

我已经创建了一个 Android 应用程序,并且我正在尝试设置 Google Play 服务,因为我想使用排行榜等。

我下载并导入了最新的插件“GooglePlayGamesPlugin-0.9.50”,导入过程中没有出现错误。

然后我转到 assets/play service resolver/android/force 解决并运行它。

运行后出现如下错误:

Resolution failed

Failed to fetch the following dependencies:

com.google.games:gpgs-plugin-support:0.9.50

UnityEngine.Debug:LogError(Object)

Google.Logger:Log(String, LogLevel)

GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)

GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List`1)

GooglePlayServices.c_AnonStorey18:<>m_26(List`1)

GooglePlayServices.c_AnonStorey14:<>m_1F(Result)

GooglePlayServices.c_AnonStorey15:<>m_28()

GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()

UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

如果我忽略错误并编译应用程序,它可以正常工作,但不会连接到 Google 服务。我可以发布和使用该应用程序而不会出现崩溃等情况,但我无法登录 Google 或查看排行榜。

我正在使用:unity 2017.1.1f1 personal 64bit

Windows 10 64 位

jdk1.8.0_162

最佳答案

您可以引用此 thread 中给出的解决方法.

  • Reimported Google Play Games Plugin (It will select the missing files by default).
  • Go to Assets menu => Play Services Resolver => Android Resolver => Force Resolve.
  • After resolving dependencies , Resolve Conflict window pops up. Click NO.
  • Build and Test your application

Add Debug.Log to check your authenticate status.

Social.localUser.Authenticate (success => {
    if (success) {
        Debug.Log ("SignIn successful");
    } else {
        Debug.Log ("SignIn failed");
    }
});

这里有一些额外的引用:

希望这对您有所帮助!

关于android - 导入后强制解析时无法使用 google play 服务 “Failed to fetch the following dependencies: com.google.games:gpgs-plugin-support:X”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49098400/

相关文章:

android - 缺少 LocationManager 所需的权限

android - SearchView 建议 - 布局宽度 : match_parent

Android:捕获后预览图片,保存前

android - 找不到与包名称匹配的客户端 (Google Analytics) - 多个 productFlavors/application id

android - 我需要停止周期性的 GcmTaskServices 吗?

android - 如何在线上传数据库并将该数据库中的数据接收到android应用程序中?

c# - Unity c# 绕过监听器效果在 IOS 设备上不起作用

c# - 是否可以录制游戏中的声音,将其保存,然后使用C#将其作为常规歌曲在手机上播放?

user-interface - Unity 3D 中的单个 Canvas 和多个面板与多个 Canvas

java - `Leaderboard` 选项卡未显示在 Google Play 游戏中,而 `Achievements` 选项卡存在