我正试图通过与AdMob的调解来展示MoPub广告。 我已经集成了所需的Manifest条目,并添加了MoPub SDK和适配器jar。
我正在接受这样的调解:
@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);
}
我在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
有什么问题?
答案 0 :(得分:1)
听起来你要么拥有不兼容的MoPub库,要么你已经使用Proguard收缩你的类并且没有为MoPub应用适当的Proguard规则。