Play-games-plugin-for-unity: Error setting up Google Play Services

Created on 5 Jun 2016  路  16Comments  路  Source: playgameservices/play-games-plugin-for-unity

So after I put in my Resource and class name (test), I press setup. Then I'm greeted with this error:

Win32Exception: ApplicationName='C:\Program Files\Java\jdk1.7.0_79\bin\bin\jar.exe', CommandLine='xvf "C:\Users\Anton\Documents\2D Ball\Assets\Plugins\Android\firebase-common-9.0.2.aar"', CurrentDirectory='C:\Users\Anton\Documents\2D Ball\Assets\Plugins\Android\firebase-common-9.0.2'
System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start ()
(wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
GooglePlayServices.DefaultResolver.ProcessAar (System.String dir, System.String aarFile) (at Assets/PlayServicesResolver/Editor/DefaultResolver.cs:213)
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/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)

Anything I can do to fix this? Using the latest plugin version with no other plugins.

Thank you so much!

Most helpful comment

However I'm now having an issue I outlined here: https://github.com/playgameservices/play-games-plugin-for-unity/issues/1210

Integrating the plugin is very frustrating. Every update seems to break what was already working. Now my script that worked fine in older projects won't work with the latest plugin.

All 16 comments

After going to Assets > Google Play Services >Resolve jars I get this:

Win32Exception: ApplicationName='C:\Program Files\Java\jdk1.7.0_79\bin\bin\jar.exe', CommandLine='xvf "C:\Users\Anton\Documents\2D Ball\Assets\Plugins\Android\firebase-common-9.0.2.aar"', CurrentDirectory='C:\Users\Anton\Documents\2D Ball\Assets\Plugins\Android\firebase-common-9.0.2'
System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start ()
(wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
GooglePlayServices.DefaultResolver.ProcessAar (System.String dir, System.String aarFile) (at Assets/PlayServicesResolver/Editor/DefaultResolver.cs:213)

Please help!

i think you can try uninstall Google Play Services by delete these folders : "GooglePlayGames" , "PlayServicesResolver" , "Plugins/Android" , "Plugins/iOS" .
and reinstall Google Play Service unitypackage again.
also you can update your jdk to 1.8.0_92

@HeavenWu Thanks for your reply! What I did:
1: Install latest JDK
2: Delete old JDK folder
3: Uninstall and reinstall Google Play Plugin
4: Stare at this error:

System.ComponentModel.Win32Exception: ApplicationName='C:\Program Files\Java\jdk1.7.0_79\bin\bin\jar.exe', CommandLine='xvf "C:\Users\Anton\Documents\2D Ball\Assets\Plugins\Android\firebase-common-9.0.2.aar"', CurrentDirectory='C:\Users\Anton\Documents\2D Ball\Assets\Plugins\Android\firebase-common-9.0.2'
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
at GooglePlayServices.DefaultResolver.ProcessAar (System.String dir, System.String aarFile) [0x000e4] in C:\Users\Anton\Documents\2D Ball\Assets\PlayServicesResolver\Editor\DefaultResolver.cs:213
UnityEngine.Debug:Log(Object)
GooglePlayServices.DefaultResolver:ProcessAar(String, String) (at Assets/PlayServicesResolver/Editor/DefaultResolver.cs:269)
GooglePlayServices.ResolverVer1_1:ProcessAars(String) (at Assets/PlayServicesResolver/Editor/ResolverVer1_1.cs:97)
GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation) (at Assets/PlayServicesResolver/Editor/ResolverVer1_1.cs:71)
GooglePlayGames.Editor.GPGSAndroidSetupUI:PerformSetup(String, String, String, String, String, Boolean) (at Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs:113)
GooglePlayGames.Editor.GPGSAndroidSetupUI:DoSetup() (at Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs:321)
GooglePlayGames.Editor.GPGSAndroidSetupUI:OnGUI() (at Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs:294)
UnityEditor.HostView:OnGUI()

Why is it looking for something that doesn't even exist?

@HeavenWu After updating Android Studio I get a new error:

Invalid Classname: An exception was thrown by the type initializer for GooglePlayGames.Editor.GPGSDependencies

Seems like progress from the first error, but still not working :(

I got the same error with the latest version of the plugin (0.9.34), I moved to 0.9.32 version and everything works.

Where can I find 0.9.32 version?

However I'm now having an issue I outlined here: https://github.com/playgameservices/play-games-plugin-for-unity/issues/1210

Integrating the plugin is very frustrating. Every update seems to break what was already working. Now my script that worked fine in older projects won't work with the latest plugin.

@DroidifyDevs yes it is very frustrating previously I got re-package error on creating an apk file.

Hello!
I get the same issue and I have found solution.
Go to https://github.com/playgameservices/play-games-plugin-for-unity and pay attention at the Android Setup section.

I have updated:

  • Google Play Services
  • Android Support Library
  • Local Maven repository for Support Libraries (Also known as Android Support Repository)
  • Google Repository
  • Android 6.0 (API 23) (this does not affect the min SDK version).

In SDK manager from Android Studio.

And I have configured Java SDK installation (do this if you are using Windows)

  1. Set the JAVA_HOME environment variable to your Java SDK installation path (for example, C:\Program Files\Java\jdk1.7.0_45).
  2. Add the Java SDK's bin folder to your PATH environment variable (for example, C:\Program Files\Java\jdk1.7.0_45\bin)
  3. Reboot.

How to edit environment variables: In Windows 2000/XP/Vista/7, right-click My Computer, then Properties, then go to Advanced System Properties (or System Properties and then click the Advanced tab), then click Environment Variables. On Windows 8, press Windows Key + W and search for environment variables For more information, consult the documentation for your version of Windows.

I hope this helps.

@Feelnside Do you have any idea how to fix my issue here? https://github.com/playgameservices/play-games-plugin-for-unity/issues/1210

Or at least can you log in a player with their Google Account and open the leaderboard?

Version 0.9.35 has a greatly improved jar resolver which will avoid many of these problems. Please open another issue if you are still having problems.

I still had this problem using 0.9.35 right now even though i had java path already defined in my environment. So i had to manually add JAVA_HOME environment variable to my java sdk path.

I also see this problem, switched back from 0.9.35 to 0.9.32. it is working with the old version.
fyi: all my sdks and jdks are up to date (11/12/16) and on place. environment variables set correctly...

Solve this trouble with re-import latest 0.10.06

Was this page helpful?
0 / 5 - 0 ratings