question

adamcopperfield avatar image
adamcopperfield asked

NoClassDefFoundError: android.support.multidex.MultiDex after adding Amazon

I use multiDex support lib in my project: compile 'com.android.support:multidex:1.0.0' .. @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } It work fine, but after adding Amazon A/B Testing SDK I've got NoClassDefFoundError exception. 12-24 11:20:26.160 27296-27296/com.com.pack E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.NoClassDefFoundError: android.support.multidex.MultiDex at com.com.pack.App.PPApplication.attachBaseContext(PPApplication.java:51) at android.app.Application.attach(Application.java:181) at android.app.Instrumentation.newApplication(Instrumentation.java:991) at android.app.Instrumentation.newApplication(Instrumentation.java:975) at android.app.LoadedApk.makeApplication(LoadedApk.java:509) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4439) at android.app.ActivityThread.access$1500(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5139) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612) at dalvik.system.NativeStart.main(Native Method)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Nick Gardner avatar image
Nick Gardner answered
Can you post your build.gradle file? It sounds like the issue would probably lie there in the build configuration, causing the multidex library to somehow be put into the secondary dex file.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.