Error building Player: Win32Exception - with plugin?

I installed this plugin to use Google Play Services with unity, and now I’m getting this error:

Error building Player: Win32Exception: ApplicationName=‘C:\Program Files\Java\jre8\bin\javac.exe’

My JAVA_HOME variable is set to the jre. If I set it to the jdk, I get an “unable to convert classes to dex format” error instead:

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.8.0_05\bin\java.exe -Xmx1024M“C:/Program Files (x86)/Android/adt-bundle-windows-x86_64-20131030/adt-bundle-windows-x86_64-20131030/sdk ools” -Dfile.encoding=UTF8 -jar “C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar” -

If I remove the plugin, the error goes away. Anyone who uses this plugin know what the problem is?

Plugin: play-games-plugin-for-unity/current-build at master · playgameservices/play-games-plugin-for-unity · GitHub

When encountering DEX errors, Unity will display the entire error message to the console. It can be helpful to see the entire error.

Usually from what i’ve seen, these are caused by attempting to include compiled classes multiple times in the build process.

For example, in case you’re including the Google Play Services library (jar) directly yourself, and the plugin you use also has its own copy for it.

Regarding the first error (when using JRE) - not sure whether Java 8 is supported or if it’s because you are using the x64 version of it (also could be a totally different reason…)