MoPub crashes application on Android 4.2



Whenever I start Application on Android 4.2 test device I get following error:

12-10 12:08:26.390 10150-10150/com.smsrobot.period E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: at<init>( at<init>( at$ at at com.smsrobot.period.PeriodApp.onCreate( at at at$1300( at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke( at$ at at dalvik.system.NativeStart.main(Native Method)

Application runs as expected on android 5.0…
It crashes when Fabric is initiated in Application class in onCreate method on line:
Fabric.with(this, new Crashlytics());

I have used latest fabric plugin to include Crashlytics and MoPub into the project, my gradle file has following lines:
compile('') { transitive = true; } compile('') { transitive = true; } compile('') { transitive = true; }

I have read on this forum that Fabric with MoPub should be initiated like this:
Fabric.with(this, new Crashlytics(), new MoPub());

But MoPub class that I have imported into project is not extended from Fabric Kit, so I can’t perform Fabric initialisation. with MoPub.
Is MoPub still extended from Fabric Kit ??

I have tried everything.

If I don’t resolve this problem in next coiple of days I will be forced to remove mopub from project.


Sorry fellas :smile:
It was my mistake, I will left this post for anyone that gets caught in same trap a I did.

I have left “multiDexEnabled true” which was causing problem on older version of Android.

But I would still like to know how to make MoPub play nicely with Fabric and how to initialize Fabric witih MoPub via:
Fabric.with(this, new Crashlytics(), new MoPub());