Android MoPub sdk with Tapjoy sdk build error



Im implementing MoPub SDK for Android with Android Studio 1.3. My project use a few more dependencies and was building and running smooth before i implemented MoPub. When i build the project with all the dependencies including mopub i get this error:

Error:Execution failed for task ':app:dexDebug'. > org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 2

when i remove the Tapjoy SDK from my dependencies the build succeeds as expected but without the Tapjoy SDK ofc:(

Im using the sdk via jCenter AAR and followed the correct steps from the “Getting Started” ( and Github (

My gradle file:

dependencies {
compile ''
compile ''
compile ''
compile files('libs/tapjoyconnectlibrary.jar')
compile files('libs/chartboost.jar')
compile files('libs/adcolony.jar')
compile('com.mopub:mopub-sdk:3.10.0@aar') { transitive = true } 



Hello Jurdefur,

Please add this to your defaultConfig in the respective build.gradle.

defaultConfig {
    multiDexEnabled true

This should fix the dex issue. It looks like with all of the SDKs and adapters included, the method limit for a single dex file of 65,536 is exceeded per Google’s documentation on MultiDex. For more information, please see the documentation here.

Let me know if it doesn’t and we can troubleshoot the issue further. If you have any questions, please reach out.



Thanks i fixed the problem by enabling proguard