Unable to convert classes into dex format
thats what the console says: CommandInvokationFailure: Unable to convert classes into dex format. C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/PEDRO/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[ Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/BuildConfig; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/IUnityAdsListener; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/UnityAds; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/UnityAds$1; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/UnityAds$2; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/UnityAds$FinishState; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/UnityAds$PlacementState; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/UnityAds$UnityAdsError; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/adunit/AdUnitActivity;
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:498) 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 ]
Answer by pedron01 · Feb 06, 2017 at 12:54 AM
Solved:I downloaded this https://www.assetstore.unity3d.com/en/#!/content/35439 and unnistalled UnityAds.
sorry, but this package is out of date, could you send a copy?
Answer by mack411 · Oct 14, 2017 at 09:26 PM
Android Jar Dependencies "Replace play-service-ads-lite version 10.2.6 with version 11.0.4"
When I opened my project after long time I got this popup, I ignored it and build the game but it gave the "Unable to convert classes into dex format build error".
I restarted unity and REPLACED the play service ads lite version as the popup came again and it SOLVED MY PROBLEM... :-D