InvalidOperationException: There was an error creating a GameServices object. Check for log errors f

Dudes,

I’m having trouble with the last version of the android sdk and GooglePlayServices library 0.9.33 unity package.

First after import the GoogleMobileAds and GooglePlayServices i get the error " failed to convert java classes to dex format", to solve this i’ve unchecked the android flag in the aar library’s play-services-drive-8.4.0 and play-services-nearby-8.4.0, then my game compiled successfully and run in my android, but i still have trouble when i try to initialize google play library, and i don’t know how to solve this, i’ve searched everywhere but it appears no one has the same problem.

Looking in the adb logcat log i saw the following error:
InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK

I don’t know if the fact that i’ve unchecked that library’s could cause or not this problem.

Someone already have this problem before ?

I’m attaching the prints of my Android SDK version and the log of the logcat.

I’m using:
*Unity 5.3.4f1

  • jdk1.8.0_91 (64 bits)
  • Google AdMob Unity Package 3.0.3 (the last one)
  • GooglePlayGamesPlugin-0.9.33.unitypackage

Thanks for your help



2645202–186323–Logcat log.txt (21.6 KB)

Just sharing how i solve the compilation problem.

I’ve manually changed the following files to force unity to use all packages in 9.0.0 version, than i can compile without uncheck any library.

Assets/PlayServicesResolver/Editor/Admobdependencies.cs
svcSupport.DependOn(“com.google.android.gms”, “play-services-ads”, “9.0.0”);

Assets/GooglePlayGames/PluginVersion.cs
public const string PlayServicesVersionConstraint = “9.0.0”;

ProjectSettings/GoogleDependencyGooglePlayGames.xml
Change all versions to 9.0.0

ProjectSettings/GoogleDependencyAdMobUnity.xml
Change all versions to 9.0.0

After them “Window / Google Play Games / Setup /Android Setup” and accept all changes

Link for github issue post:

1 Like