Unity3D – Google Play Services error after install

Dear friendy reader,

nice to see you around here. I publish these articles for free and it would be very kind of you to support my blog. You can start by disabling your AdBlocker. That would mean a lot to me and will help to finance this blog.

Best regards, J. Wiese

TL;DR: Open Android SDK Manager and install “Extras/Android Support Repository”.

After importing the unitypackage from play-games-plugin-for-unity, the project throws an error and stopped working. The error was not helpful at all, but the warning “Unable to find dependency com.android.support:support” indicates that the “Android Support Repository” is missing. Even if the support repository is not installed, the folder “$SDK/extras/android/m2repository” is present.

Google.JarResolver.ResolutionException: Cannot find candidate artifact for com.android.support:support-v4:24.0.0
  at Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List`1 repoPaths) [0x00000] in <filename unknown>:0 
  at Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep) [0x00000] in <filename unknown>:0 
  at Google.JarResolver.PlayServicesSupport.ResolveDependencies (Boolean useLatest, System.String destDirectory, Google.JarResolver.ExplodeAar explodeAar) [0x00000] in <filename unknown>:0 
  at GooglePlayServices.ResolverVer1_1.DoResolutionNoAndroidPackageChecks (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation) [0x00000] in <filename unknown>:0 
UnityEngine.Debug:LogError(Object)
GooglePlayServices.ResolverVer1_1:DoResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey5:<>m__8()
GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

ERROR: Unable to find dependency com.android.support:support-v4:24.0.0 in paths ($SDK/extras/android/m2repository, $SDK/extras/google/m2repository, $SDK/extras/android/m2repository, $SDK/extras/google/m2repository).

com.android.support:support-v4:24.0.0 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.GetDependencies(Google.JarResolver.Dependency dep)
   at Google.JarResolver.PlayServicesSupport.ResolveDependencies(Boolean useLatest, System.String destDirectory, Google.JarResolver.ExplodeAar explodeAar)
   at GooglePlayServices.ResolverVer1_1.DoResolutionNoAndroidPackageChecks(Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation)
   at GooglePlayServices.ResolverVer1_1+<DoResolution>c__AnonStorey5.<>m__8()
   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 /home/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:line 249


UnityEngine.Debug:Log(Object)
Google.JarResolver.PlayServicesSupport:Log(String, Boolean)
Google.JarResolver.PlayServicesSupport:FindCandidate(Dependency, List`1)
Google.JarResolver.PlayServicesSupport:GetDependencies(Dependency, List`1)
Google.JarResolver.PlayServicesSupport:GetDependencies(Dependency)
Google.JarResolver.PlayServicesSupport:ResolveDependencies(Boolean, String, ExplodeAar)
GooglePlayServices.ResolverVer1_1:DoResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey5:<>m__8()
GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Leave a Reply

Your email address will not be published.