After add ads from Services, unity shows "Unable to convert classes into dex format"...

Hey!
Sorry about English. But i don’t know what to do. I added ads from Unity Services in project, and then tried to Build apk, and then it shows “Unable to Convert classes to dex format”
Can anybody help me?

There is copy from console.

CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_112\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“D:/android-sdk-windows ools” -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:608)
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:600)
… 9 more
]
stdout[
processing archive D:\THEROCKETS-CAREER\Unity Project\The Rockets - CAREER\Temp\StagingArea\android-libraries\UnityAds\libs.\classes.jar…
processing com/unity3d/ads/BuildConfig.class…
processing com/unity3d/ads/IUnityAdsListener.class…
processing com/unity3d/ads/UnityAds.class…
processing com/unity3d/ads/UnityAds$1.class…
processing com/unity3d/ads/UnityAds$2.class…
processing com/unity3d/ads/UnityAds$FinishState.class…
processing com/unity3d/ads/UnityAds$PlacementState.class…
processing com/unity3d/ads/UnityAds$UnityAdsError.class…
processing com/unity3d/ads/adunit/AdUnitActivity.class…
processing com/unity3d/ads/adunit/AdUnitError.class…
processing com/unity3d/ads/adunit/AdUnitEvent.class…
processing com/unity3d/ads/adunit/AdUnitOpen.class…
processing com/unity3d/ads/adunit/AdUnitSoftwareActivity.class…
processing com/unity3d/ads/api/AdUnit.class…
processing com/unity3d/ads/api/AdUnit$1.class…
processing com/unity3d/ads/api/AdUnit$2.class…
processing com/unity3d/ads/api/AdUnit$3.class…
processing com/unity3d/ads/api/AdUnit$4.class…
processing com/unity3d/ads/api/AdUnit$5.class…
processing com/unity3d/ads/api/Broadcast.class…
processing com/unity3d/ads/api/Cache.class…
processing com/unity3d/ads/api/Cache$1.class…
processing com/unity3d/ads/api/Connectivity.class…
processing com/unity3d/ads/api/DeviceInfo.class…
processing com/unity3d/ads/api/DeviceInfo$1.class…
processing com/unity3d/ads/api/DeviceInfo$StorageType.class…
processing com/unity3d/ads/api/Intent.class…
processing com/unity3d/ads/api/Intent$IntentError.class…
processing com/unity3d/ads/api/Listener.class…
processing com/unity3d/ads/api/Listener$1.class…
processing com/unity3d/ads/api/Listener$2.class…
processing com/unity3d/ads/api/Listener$3.class…
processing com/unity3d/ads/api/Listener$4.class…
processing com/unity3d/ads/api/Listener$5.class…
processing com/unity3d/ads/api/Placement.class…
processing com/unity3d/ads/api/Request.class…
processing com/unity3d/ads/api/Request$1.class…
processing com/unity3d/ads/api/Request$2.class…
processing com/unity3d/ads/api/Request$3.class…
processing com/unity3d/ads/api/Resolve.class…
processing com/unity3d/ads/api/Resolve$1.class…
processing com/unity3d/ads/api/Sdk.class…
processing com/unity3d/ads/api/Storage.class…
processing com/unity3d/ads/api/VideoPlayer.class…
processing com/unity3d/ads/api/VideoPlayer$1.class…
processing com/unity3d/ads/api/VideoPlayer$2.class…
processing com/unity3d/ads/api/VideoPlayer$3.class…
processing com/unity3d/ads/api/VideoPlayer$4.class…
processing com/unity3d/ads/api/VideoPlayer$5.class…
processing com/unity3d/ads/api/VideoPlayer$6.class…
processing com/unity3d/ads/broadcast/BroadcastError.class…
processing com/unity3d/ads/broadcast/BroadcastEvent.class…
processing com/unity3d/ads/broadcast/BroadcastEventReceiver.class…
processing com/unity3d/ads/broadcast/BroadcastMonitor.class…
processing com/unity3d/ads/cache/CacheDirectory.class…
processing com/unity3d/ads/cache/CacheError.class…
processing com/unity3d/ads/cache/CacheEvent.class…
processing com/unity3d/ads/cache/CacheThread.class…
processing com/unity3d/ads/cache/CacheThreadHandler.class…
processing com/unity3d/ads/cache/CacheThreadHandler$1.class…
processing com/unity3d/ads/configuration/Configuration.class…
processing com/unity3d/ads/configuration/ConfigurationFailure.class…
processing com/unity3d/ads/configuration/EnvironmentCheck.class…
processing com/unity3d/ads/configuration/InitializeThread.class…
processing com/unity3d/ads/configuration/InitializeThread$1.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeState.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateAdBlockerCheck.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateAdBlockerCheck$1.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateAdBlockerCheck$2.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateComplete.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateConfig.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateCreate.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateError.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateError$1.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateLoadCache.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateLoadWeb.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateNetworkError.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateReset.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateReset$1.class…
processing com/unity3d/ads/configuration/InitializeThread$InitializeStateRetry.class…
processing com/unity3d/ads/connectivity/ConnectivityChangeReceiver.class…
processing com/unity3d/ads/connectivity/ConnectivityEvent.class…
processing com/unity3d/ads/connectivity/ConnectivityMonitor.class…
processing com/unity3d/ads/connectivity/ConnectivityMonitor$1.class…
processing com/unity3d/ads/connectivity/ConnectivityNetworkCallback.class…
processing com/unity3d/ads/connectivity/IConnectivityListener.class…
processing com/unity3d/ads/device/AdvertisingId.class…
processing com/unity3d/ads/device/AdvertisingId$1.class…
processing com/unity3d/ads/device/AdvertisingId$GoogleAdvertisingInfo.class…
processing com/unity3d/ads/device/AdvertisingId$GoogleAdvertisingInfo$GoogleAdvertisingInfoBinder.class…
processing com/unity3d/ads/device/AdvertisingId$GoogleAdvertisingInfo$GoogleAdvertisingInfoBinder$GoogleAdvertisingInfoImplementation.class…
processing com/unity3d/ads/device/AdvertisingId$GoogleAdvertisingServiceConnection.class…
processing com/unity3d/ads/device/Device.class…
processing com/unity3d/ads/device/Device$1.class…
processing com/unity3d/ads/device/Device$MemoryInfoType.class…
processing com/unity3d/ads/device/DeviceError.class…
processing com/unity3d/ads/device/Storage.class…
processing com/unity3d/ads/device/StorageError.class…
processing com/unity3d/ads/device/StorageEvent.class…
processing com/unity3d/ads/device/StorageManager.class…
processing com/unity3d/ads/device/StorageManager$StorageType.class…
processing com/unity3d/ads/log/DeviceLog.class…
processing com/unity3d/ads/log/DeviceLog$1.class…
processing com/unity3d/ads/log/DeviceLog$UnityAdsLogLevel.class…
processing com/unity3d/ads/log/DeviceLogEntry.class…
processing com/unity3d/ads/log/DeviceLogLevel.class…
processing com/unity3d/ads/mediation/IUnityAdsExtendedListener.class…
processing com/unity3d/ads/metadata/MediationMetaData.class…
processing com/unity3d/ads/metadata/MetaData.class…
processing com/unity3d/ads/metadata/PlayerMetaData.class…
processing com/unity3d/ads/misc/Utilities.class…
processing com/unity3d/ads/misc/ViewUtilities.class…
processing com/unity3d/ads/placement/Placement.class…
processing com/unity3d/ads/properties/ClientProperties.class…
processing com/unity3d/ads/properties/SdkProperties.class…
processing com/unity3d/ads/request/IResolveHostListener.class…
processing com/unity3d/ads/request/IWebRequestListener.class…
processing com/unity3d/ads/request/IWebRequestProgressListener.class…
processing com/unity3d/ads/request/ResolveHostError.class…
processing com/unity3d/ads/request/ResolveHostEvent.class…
processing com/unity3d/ads/request/WebRequest.class…
processing com/unity3d/ads/request/WebRequest$RequestType.class…
processing com/unity3d/ads/request/WebRequestError.class…
processing com/unity3d/ads/request/WebRequestEvent.class…
processing com/unity3d/ads/request/WebRequestHandler.class…
processing com/unity3d/ads/request/WebRequestResultReceiver.class…
processing com/unity3d/ads/request/WebRequestThread.class…
processing com/unity3d/ads/request/WebRequestThread$1.class…
processing com/unity3d/ads/request/WebRequestThread$1$1.class…
processing com/unity3d/ads/video/VideoPlayerError.class…
processing com/unity3d/ads/video/VideoPlayerEvent.class…
processing com/unity3d/ads/video/VideoPlayerView.class…
processing com/unity3d/ads/video/VideoPlayerView$1.class…
processing com/unity3d/ads/video/VideoPlayerView$2.class…
processing com/unity3d/ads/video/VideoPlayerView$3.class…
processing com/unity3d/ads/video/VideoPlayerView$4.class…
processing com/unity3d/ads/video/VideoPlayerView$5.class…
processing com/unity3d/ads/video/VideoPlayerView$6.class…
processing com/unity3d/ads/webview/WebView.class…
processing com/unity3d/ads/webview/WebView$JavaScriptInvocation.class…
processing com/unity3d/ads/webview/WebViewApp.class…
processing com/unity3d/ads/webview/WebViewApp$1.class…
processing com/unity3d/ads/webview/WebViewApp$WebAppChromeClient.class…
processing com/unity3d/ads/webview/WebViewApp$WebAppClient.class…
processing com/unity3d/ads/webview/WebViewEventCategory.class…
processing com/unity3d/ads/webview/bridge/CallbackStatus.class…
processing com/unity3d/ads/webview/bridge/Invocation.class…
processing com/unity3d/ads/webview/bridge/NativeCallback.class…
processing com/unity3d/ads/webview/bridge/WebViewBridge.class…
processing com/unity3d/ads/webview/bridge/WebViewBridgeError.class…
processing com/unity3d/ads/webview/bridge/WebViewBridgeInterface.class…
processing com/unity3d/ads/webview/bridge/WebViewCallback.class…
processing com/unity3d/ads/webview/bridge/WebViewCallback$1.class…
processing com/unity3d/ads/webview/bridge/WebViewExposed.class…
processing archive D:\THEROCKETS-CAREER\Unity Project\The Rockets - CAREER\Temp\StagingArea\android-libraries\unity-ads\libs.\classes.jar…
processing com/unity3d/ads/BuildConfig.class…
processing com/unity3d/ads/IUnityAdsListener.class…
processing com/unity3d/ads/UnityAds.class…
processing com/unity3d/ads/UnityAds$1.class…
processing com/unity3d/ads/UnityAds$2.class…
processing com/unity3d/ads/UnityAds$FinishState.class…
processing com/unity3d/ads/UnityAds$PlacementState.class…
processing com/unity3d/ads/UnityAds$UnityAdsError.class…
processing com/unity3d/ads/adunit/AdUnitActivity.class…
processing com/unity3d/ads/adunit/AdUnitError.class…
processing com/unity3d/ads/adunit/AdUnitEvent.class…
processing com/unity3d/ads/adunit/AdUnitOpen.class…
processing com/unity3d/ads/adunit/AdUnitSoftwareActivity.class…
processing com/unity3d/ads/api/AdUnit.class…
processing com/unity3d/ads/api/AdUnit$1.class…
processing com/unity3d/ads/api/AdUnit$2.class…
processing com/unity3d/ads/api/AdUnit$3.class…
processing com/unity3d/ads/api/AdUnit$4.class…
processing com/unity3d/ads/api/Broadcast.class…
processing com/unity3d/ads/api/Cache.class…
processing com/unity3d/ads/api/Cache$1.class…
processing com/unity3d/ads/api/Connectivity.class…
processing com/unity3d/ads/api/DeviceInfo.class…
processing com/unity3d/ads/api/DeviceInfo$1.class…
processing com/unity3d/ads/api/DeviceInfo$StorageType.class…
processing com/unity3d/ads/api/Intent.class…
processing com/unity3d/ads/api/Intent$IntentError.class…
processing com/unity3d/ads/api/Listener.class…
processing com/unity3d/ads/api/Listener$1.class…
processing com/unity3d/ads/api/Listener$2.class…
processing com/unity3d/ads/api/Listener$3.class…
processing com/unity3d/ads/api/Listener$4.class…
processing com/unity3d/ads/api/Placement.class…
processing com/unity3d/ads/api/Request.class…
processing com/unity3d/ads/api/Request$1.class…
processing com/unity3d/ads/api/Request$2.class…
processing com/unity3d/ads/api/Request$3.class…
processing com/unity3d/ads/api/Resolve.class…
processing com/unity3d/ads/api/Resolve$1.class…
processing com/unity3d/ads/api/Sdk.class…
processing com/unity3d/ads/api/Storage.class…
processing com/unity3d/ads/api/VideoPlayer.class…
processing com/unity3d/ads/api/VideoPlayer$1.class…
processing com/unity3d/ads/api/VideoPlayer$2.class…
processing com/unity3d/ads/api/VideoPlayer$3.class…
processing com/unity3d/ads/api/VideoPlayer$4.class…
processing com/unity3d/ads/api/VideoPlayer$5.class…
processing com/unity3d/ads/api/VideoPlayer$6.class…
processing com/unity3d/ads/broadcast/BroadcastError.class…
processing com/unity3d/ads/broadcast/BroadcastEvent.class…
processing com/unity3d/ads/broadcast/BroadcastEventReceiver.class…
processing

Thanks! Markuss.

HI @Brikmanis
It is taking the Unity Ads sdk from two places. So remove the external sdk.

Ashish Verma
ashish.verma@dazzledapps.com