加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

无法找到依赖项com.google.android.gms:play-services-ads-lite

发布时间:2020-12-14 04:47:21 所属栏目:百科 来源:网络整理
导读:我将Firebase Analytics导入到我的Unity项目中.我在 Android SDK Manager中更新了几个软件包中的Google Play服务.当我尝试编译Unity项目时,出现以下错误: 1) Unable to find dependency com.google.android.gms:play-services-ads-lite:[10.2.4] in paths (
我将Firebase Analytics导入到我的Unity项目中.我在 Android SDK Manager中更新了几个软件包中的Google Play服务.当我尝试编译Unity项目时,出现以下错误:

1)

Unable to find dependency com.google.android.gms:play-services-ads-lite:[10.2.4] in paths ($SDKextrasandroidm2repository,$SDKextrasgooglem2repository,$SDKextrasandroidm2repository,$SDKextrasgooglem2repository).

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:buildslaveunitybuildartifactsgeneratedcommoneditorEditorApplicationBindings.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.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:对不起我的英文,太糟糕了:(.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读