- Home /
"Unable to convert classes into dex format" after update to Unity 5
Today I updated my project to Unity 5. Everything was working fine at first, but as soon as I tried to build my game for android I got an error:
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.8.0_20\bin\java.exe -Xmx2048M - Dcom.android.sdkmanager.toolsdir="C:/Program Files/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar"
So I took a look at the console output and I found the following lines:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException:
already added:
Lcom/android/vending/billing/IInAppBillingService$Stub$Proxy;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:732)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
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:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at SDKMain.main(SDKMain.java:129)
I'm using the following plugins:
Soomla Store - In App Purchase
Google Play Games plugin
Google AdMob plugin
I'm guessing the Soomla Plugin is causing the error, but I can't seem to find a solution. Had someone a similar problem or does anyone know how to solve this issue?
Thanks!
Same for me and my setup is pretty similiar to yours. I think facebook might be the issue since I had made builds in Unity 5 fine then I stupidly decided to updated Facebook and everything is broken again
Yup it was facebook for me. It usually caused by having two of the same jar and then thus two of the same class. This was the problem for me:
http://answers.unity3d.com/questions/787910/error-building-player-commandinvokationfailure-una.html
Very bottom the comment about bolts
Answer by K3n Ichi · Mar 13, 2015 at 12:22 AM
I've just deleted the Soomla/compilation (made a backup first) folder and it´s compile normally again.
Your answer
