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.
我试图通过与AdMob的调解来展示MoPub广告。我已经集成了所需的Manifest条目,并添加了MoPub SDK和适配器jar。
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
我在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?
怎么了?
1 个解决方案
#1
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.
听起来你要么有不兼容的MoPub库,要么你使用Proguard缩小你的类并且没有为MoPub应用适当的Proguard规则。
#1
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.
听起来你要么有不兼容的MoPub库,要么你使用Proguard缩小你的类并且没有为MoPub应用适当的Proguard规则。