Google play Games plug in: failed to find candidate artifact for play-services-base

 Google.JarResolver.ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-base:[10.2.4]
   at Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep) [0x00000] in <filename unknown>:0
   at Google.JarResolver.PlayServicesSupport.ResolveDependencies (Boolean useLatest, System.String destDirectory) [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:smile:oResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey5:<>m__8()
GooglePlayServices.ResolverVer1_1:smile:oResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:MenuResolve()

Hi I got into a trouble with google play games plug in. So I already have newest build tool, repository, support repository, and the play services in sdk manager

But i still got this error in unity

I actually succeed in building the apk although there’s still “Google play services may not work properly” notice as I haven’t set its google API yet

How to resolve the error? :frowning: I read that I need to update my play service but i already have the newest one (Rev 39) thanks in advance

Looks like it’s searching for a specific version: play-services-base:[10.2.4]

You should have a file (.cs) in your project that dictates which versions should be used for each component of google play services.

For example, for the “Google Play Games Plugin”, it is called PluginVersion.cs

Are you sure you have the most up to date version in the repository? you can try to look for this particular version in the file system under your Android SDK installation folder.

Do you have other google play libraries in your project? (named play-services-xxxx.aar). what are their version number?

Here is my sdk manager, i’ve already updated all the required extras
sdk manager

And i already found the play service version inside respitory
play service in file explorer

I tried to search and I found play-services-base-10.2.1.aar.meta inside my /plugins/android
aar

And here is my plug in versions cs
plugin versions

#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames
{
  public class PluginVersion
  {
    // older versions, used when upgrading to other versions
    public const string VersionKeyCPP = "00911";
    public const string VersionKeyU5 = "00915";
    // patched 0.9.27 version for Unity 5.3 changes.
    public const string VersionKey27Patch = "00927a";

    public const string VersionKeyJarResolver = "00928";
    public const string VersionKeyNativeCRM = "00930";

    // Using JNI to get spendprobability - so don't delete the Games.cs files.
    public const string VersionKeyJNIStats = "00934";

    // New and improved jar resolver
    public const string VersionKeyJarResolverDLL = "00935";

    // Current Version.
    public const int VersionInt = 0x0936;
    public const string VersionString = "0.9.36";
    public const string VersionKey = "00936";

    // used to check for the correct min version or play services.
    public const int MinGmsCoreVersionCode = 8487000;

    // used to get the right version of dependencies.
    public const string PlayServicesVersionConstraint = "9+";
  }
}
#endif

maybe you can delete the “repository” folder and download it again from the SDK manager. i can see a 10.2.4 folder in the screenshot, but who knows if it contains anything in it.

1 Like

I’ll try to redownload the repository

this is the content of 10.2.4 folder
10.2.4 folder

i Have redownload both repository and repository support but i still got the error
error

ERROR: Unable to find dependency com.google.android.gms play-services-base [10.2.4] in ($SDK\extras\android\m2repository, $SDK\extras\google\m2repository, $SDK\extras\android\m2repository, $SDK\extras\google\m2repository)
UnityEngine.Debug:Log(Object)
Google.JarResolver.PlayServicesSupport:Log(String, Boolean)
Google.JarResolver.PlayServicesSupport:FindCandidate(Dependency)
Google.JarResolver.PlayServicesSupport:GetDependencies(Dependency)
Google.JarResolver.PlayServicesSupport:ResolveDependencies(Boolean, String)
GooglePlayServices.ResolverVer1_1:smile:oResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey5:<>m__8()
GooglePlayServices.ResolverVer1_1:smile:oResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

And the error on my first post :frowning:

And i’ve found the both the base and regular aar of 10.2.4 version of play services deep inside google repository

Have you found the solution?

@UITerR are you sure your Unity installation is pointing to the right Android SDK location? maybe you have multiple Android SDKs installed on your machine.

I’m having identical problem. Anyone solved it? I’ve removed-installed several times.

@ and are you sure you have this .aar file under your Android SDK folder? (versioned 10.2.4)

Hi all - I am getting the same problems as the OP. (This started happening whilst upgrading a Unity plugin).

I’ll keep trying and be sure to post if I discover anything.

In my case helped:

2 Likes