我已经创建了一个 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/