- Home /
Unable to convert classes into dex format
I was not completely new for this error but this time I can't able to figure this out. So after reading details please give me some hint into this.
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/gaminguruz/Siddharth/Gaming/AndEngine/Software/adt-bundle-mac-x86_64-20140702/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqc;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqd;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqd$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqe;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqe$zza;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqf;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqg;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqh;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqh$zza;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
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:497)
at SDKMain.main(SDKMain.java:129)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
... 9 more
]
I already checked for repetition of jar files but those are unique.
EDIT: One more point I want to add into this, last time I closed this project as game submitted to google play store so at that time worked perfectly. But this is my build generation effort after 6 months. Definitely .aar updation occur in updation by Unity itself.
Total 3 Plugins exist:
RevMob
Google Play Games
In App Purchase
1) check duplication of jars 2) Check there is not any two sdks with different versions 3) may be an issue of jdk , like some files need to compile with 1.7 and other 1.8 4) sometimes Support v4 exist in more than two folders so check it
@sohail_768, 1) duplication of jars is not the case here 2) this is also not the case 3) how to check issue of jdk? 4) only single support file exist!!!
play-games-plugin-support jar file exist in project, is this require in project if several .aar files exist.
Answer by liortal · Sep 26, 2016 at 03:30 PM
The key here is the error message you posted:
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqc;
You have duplicate classes (from different libraries) that are being added into the final game package. Since this is not allowed, the build fails with an error (Unable to convert classes into Dex format).
Now, the trick is to find out where these classes come from. From their package name, these are originating from some google play services libraries in your project that are duplicated (at least - the class names are duplicate). This can be learned from the full class name - Lcom/google/android/gms/internal/zzqc
NOTE: I provide a service for fixing such build issues, in case you cannot resolve this on your own.
Your answer
Follow this Question
Related Questions
CommandInvokationFailure: Gradle build failed. unity 2019.4.22 1 Answer
Use Android plugin with android support library dependency with gradle builds in Unity 5.5 1 Answer
CommandInvokationFailure: Failed to re-package resources. 1 Answer
how can I install the android platform support in Linux? 0 Answers
When update android project from 2017 to 2018, I can't build it anymore 0 Answers