Question

i have just a blank project with prime31 google play game services plugin in it and im trying to run the demo scene and i keep getting this error, i feel like its something simple like setting environment variables or something, any help is greatly appreciated thank you

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. C:Program Files (x86)Javajdk1.7.0_51binjava.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/John P. Rowan III/android-sdkstools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayersdktools.jar" -

stderr[

UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.iface.ParseException: bad class file magic (00051607) or version (0000.0002) at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472) at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388) at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251) at com.android.dx.command.dexer.Main.processClass(Main.java:665) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634) at com.android.dx.command.dexer.Main.access$600(Main.java:78) at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166) at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144) at com.android.dx.command.dexer.Main.processOne(Main.java:596) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at SDKMain.main(SDKMain.java:129) ...while parsing __MACOSX/com/google/android/gms/ads/._a.class

1 error; aborting

Was it helpful?

Solution

Interesting as for environment variables, no, that will only help you find files that are missing, in this case we have a parsing error in your plugin.

There are multiple things you can try to resolve it, one weird thing i notice in the log was the path to java: C:Program Files (x86)Javajdk1.7.0_51binjava.exe There are no dashes "\" in the path, might be wrong but that might be neeeded.

Secondly, if you open the project in eclipse and try to compile it from there, if it still gets you error's you might want to contact prime31 for support, since this is a parsing error in the code, which you can see from the log.

"UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.iface.ParseException: bad class file magic " means that there are lines or characters in places that do not belong there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top