Play-games-plugin-for-unity: Resolution Exception

Created on 14 Nov 2015  路  12Comments  路  Source: playgameservices/play-games-plugin-for-unity

Hi! After adding the unitypackage to a fresh project, I have this error:

ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-games:8.1+
Google.JarResolver.PlayServicesSupport.DependOn (System.String group, System.String artifact, System.String version)
GooglePlayGames.BackgroundResolution.AddDependencies () (at Assets/GooglePlayGames/Editor/BackgroundResolution.cs:53)
GooglePlayGames.BackgroundResolution..cctor () (at Assets/GooglePlayGames/Editor/BackgroundResolution.cs:45)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for GooglePlayGames.BackgroundResolution
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101)
UnityEditor.EditorAssemblies.ProcessEditorInitializeOnLoad (System.Type type) (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:123)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:27)

Most helpful comment

In the SDK manager, you'll need to update (under SDK tools or "extras"):

  1. Android Support Library - rev. 24 or greater
  2. Google Play services - rev. 28 or greater
  3. Google Repository - rev. 23 or greater.

All 12 comments

Need install or update Android SDK - Extras/Android Support Repository

That did work, thanks!

I got the same error with a blank project. I've updated Android Support Repository to Rev 25
Using Unity 5.2.2p3 and GooglePlayGamesPlugin-0.9.27

In the SDK manager, you'll need to update (under SDK tools or "extras"):

  1. Android Support Library - rev. 24 or greater
  2. Google Play services - rev. 28 or greater
  3. Google Repository - rev. 23 or greater.

Sounds like this one is resolved. Please (re)open an issue if there are still problems.

also, if you get an error from the SDK compiler, then ensure you are doing a "Run as administrator" on the SDK Manager.

I seem to be having the same issue I'm not sure what it is, but I still havent resolved this after doing the above.

Installing:

  1. Android Support Library - rev. 24 or greater
  2. Google Repository - rev. 23 or greater

worked for me. Thanks!

It looks like Google has renamed the Android Support Library to Local Maven repository for Support Libraries with the lated SDK tools. Can someone conform this?

If you've updated your SDK version, make sure that your SDK location is correct in
Unity > Preferences > External Tools > Android SDK

Mine was set to:
/Users/${myUsername}/android-sdk (a non-updated SDK that I'd downloaded)
But should have been set to:
/Users/${myUsername}/Library/Android/sdk (the SDK attached to Android Studio and the SDK Manager)

You can confirm this if you launch Android Studio > Configure > SDK Manager and look at the Android SDK Location.

@abreitenfeld - yes, it was renamed.

This is an android related issue but why I am seeing it on and iOS build ?

Was this page helpful?
0 / 5 - 0 ratings