Borislav
Borislav

Reputation: 919

AdMob mediating MoPub - errors and not loading ads

I am trying to show MoPub ads through mediation with AdMob. I have integrated the needed Manifest entries, and added the MoPub SDK and adapter jars.

I am seting up the mediation like this:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    MillennialAdapterExtras millenialExtras = new MillennialAdapterExtras();
    InMobiAdapterExtras inmobiExtras = new InMobiAdapterExtras();
    MoPubExtras mopubExtras = new MoPubExtras();    

    FlurryAgent.init(this, "some id");
    FlurryAdapterExtras flurryExtras = new FlurryAdapterExtras();
    FlurryAgent.setLogEnabled(false);

    AdView mAdView = (AdView) findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder()
            .addNetworkExtras(flurryExtras)
            .addNetworkExtras(millenialExtras)
            .addNetworkExtras(inmobiExtras)
            .addNetworkExtras(mopubExtras)
            .build();
    mAdView.loadAd(adRequest);
}

And I am getting these warning in LogCat

    05-08 11:30:48.638: I/Ads(9152): Instantiating mediation adapter: com.mopub.mobileads.dfp.adapters.MoPubAdapter
05-08 11:30:48.648: I/dalvikvm(9152): Could not find method com.mopub.mobileads.MoPubView.destroy, referenced from method com.mopub.mobileads.dfp.adapters.MoPubAdapter.destroy
05-08 11:30:48.648: W/dalvikvm(9152): VFY: unable to resolve virtual method 48634: Lcom/mopub/mobileads/MoPubView;.destroy ()V
05-08 11:30:48.658: I/dalvikvm(9152): Could not find method com.mopub.mobileads.MoPubInterstitial.destroy, referenced from method com.mopub.mobileads.dfp.adapters.MoPubAdapter.destroy
05-08 11:30:48.658: W/dalvikvm(9152): VFY: unable to resolve virtual method 48626: Lcom/mopub/mobileads/MoPubInterstitial;.destroy ()V
05-08 11:30:48.658: W/dalvikvm(9152): VFY:  rejected Lcom/mopub/mobileads/dfp/adapters/MoPubAdapter;.getBannerView ()Landroid/view/View;
05-08 11:30:48.658: W/dalvikvm(9152): Verifier rejected class Lcom/mopub/mobileads/dfp/adapters/MoPubAdapter;
05-08 11:30:48.658: W/dalvikvm(9152): Class init failed in newInstance call (Lcom/mopub/mobileads/dfp/adapters/MoPubAdapter;)
05-08 11:30:48.658: W/Ads(9152): Could not instantiate mediation adapter: com.mopub.mobileads.dfp.adapters.MoPubAdapter. com/mopub/mobileads/dfp/adapters/MoPubAdapter

What is wrong?

Upvotes: 2

Views: 669

Answers (1)

William
William

Reputation: 20196

It sounds like you either have incompatible MoPub libraries or you have used Proguard to shrink your classes and haven't applied the appropriate Proguard rules for MoPub.

Upvotes: 1

Related Questions