我将Firebase Analytics导入到我的Unity项目中.我在 Android SDK Manager中更新了几个软件包中的Google Play服务.当我尝试编译Unity项目时,出现以下错误: 1) Unable to find dependency com.google.android.gms:pl
1)
Unable to find dependency com.google.android.gms:play-services-ads-lite:[10.2.4] in paths ($SDK\extras\android\m2repository, $SDK\extras\google\m2repository, $SDK\extras\android\m2repository, $SDK\extras\google\m2repository). com.google.android.gms:play-services-ads-lite:[10.2.4] was referenced by: at System.Environment.get_StackTrace() in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Environment.cs:line 227 at Google.JarResolver.Dependency..ctor(System.String group, System.String artifact, System.String version, System.String[] packageIds, System.String[] repositories) at Google.JarResolver.PlayServicesSupport.GetDependencies(Google.JarResolver.Dependency dep, System.Collections.Generic.List`1 repoPaths) at Google.JarResolver.PlayServicesSupport.GetTransitiveDependencies(System.Collections.Generic.Dictionary`2 dependencies, System.Collections.Generic.List`1 repoPaths) at Google.JarResolver.PlayServicesSupport.FindMissingDependencyPaths(System.String destinationDirectory, System.Collections.Generic.Dictionary`2 ByRef dependencyPaths, Google.JarResolver.ExplodeAar explodeAar) at GooglePlayServices.ResolverVer1_1.DoResolution(Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation, System.Action resolutionComplete) at GooglePlayServices.PlayServicesResolver.Resolve(System.Action resolutionComplete) at GooglePlayServices.PlayServicesResolver.AutoResolve() at UnityEditor.EditorApplication.Internal_CallUpdateFunctions() in C:\buildslave\unity\build\artifacts\generated\common\editor\EditorApplicationBindings.gen.cs:line 197 UnityEngine.Debug:LogError(Object) GooglePlayServices.PlayServicesResolver:<PlayServicesResolver>m__0(String, LogLevel) Google.JarResolver.PlayServicesSupport:Log(String, LogLevel, Boolean) Google.JarResolver.PlayServicesSupport:FindCandidate(Dependency, List`1) Google.JarResolver.PlayServicesSupport:GetDependencies(Dependency, List`1) Google.JarResolver.PlayServicesSupport:GetTransitiveDependencies(Dictionary`2, List`1) Google.JarResolver.PlayServicesSupport:FindMissingDependencyPaths(String, Dictionary`2&, ExplodeAar) GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action) GooglePlayServices.PlayServicesResolver:Resolve(Action) GooglePlayServices.PlayServicesResolver:AutoResolve() UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
2)
ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-ads-lite:[10.2.4] Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List`1 repoPaths) Google.JarResolver.PlayServicesSupport.GetTransitiveDependencies (System.Collections.Generic.Dictionary`2 dependencies, System.Collections.Generic.List`1 repoPaths) Google.JarResolver.PlayServicesSupport.FindMissingDependencyPaths (System.String destinationDirectory, System.Collections.Generic.Dictionary`2& dependencyPaths, Google.JarResolver.ExplodeAar explodeAar) GooglePlayServices.ResolverVer1_1.DoResolution (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation, System.Action resolutionComplete) GooglePlayServices.PlayServicesResolver.Resolve (System.Action resolutionComplete) GooglePlayServices.PlayServicesResolver.AutoResolve () UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:197)
当我去Assets>时我遇到了同样的错误播放服务解析器> Android解析器>解析客户端jar.
我该怎么做才能消除错误?
我想我解决了.转到项目Assets / GooglePlayGames / PluginVersion.cs中的文件,
inside将PlayServicesVersionConstraint更改为“10.2.1”(默认值为“10”).
保存并走向统一.
在菜单中转到资产>播放服务解析器> Android解析器>解决客户Jar.如果程序询问您有关更改版本的信息,请按ok.
该应用程序应该工作.
PS:对不起我的英文,太糟糕了:(.