NoClassDefFoundError: com.mopub.mobileads.AdViewController$1


#1

I am integrating MoPub 4.3.0 SDK into my Android project.
I use Ant to build my project without IDE.
So I extract the jar file from MoPub aar file and put it in the libs directory.
When I launch my app, I got this error
E/AndroidRuntime(31818): java.lang.NoClassDefFoundError: com.mopub.mobileads.AdViewController$1
E/AndroidRuntime(31818): at com.mopub.mobileads.AdViewController.(AdViewController.java:112)
E/AndroidRuntime(31818): at com.mopub.mobileads.factories.AdViewControllerFactory.internalCreate(AdViewControllerFactory.java:21)
E/AndroidRuntime(31818): at com.mopub.mobileads.factories.AdViewControllerFactory.create(AdViewControllerFactory.java:17)
E/AndroidRuntime(31818): at com.mopub.mobileads.MoPubView.(MoPubView.java:74)
E/AndroidRuntime(31818): at com.mopub.mobileads.MoPubView.(MoPubView.java:48)

Please help, thank you.


#2

I fixed this problem by adding mopub-volley-1.1.0.jar.


#3

Hi @vincentgao,

I am so glad to hear you were able to resolve the problem! Please don’t hesitate to reach out to us if you need additional help in the future.

Thanks!