什么是GADMAdapterCustomEvents类

时间:2012-09-05 14:51:44

标签: android admob google-dfp

我在我的应用中放置广告,我需要在我的应用中支持AdMob中介和DFP广告管理系统(发布商双击)广告。我认为我做的一切都是正确的,我包含了(新的)AdMob SDK,以及来自此网址的所有其他发布商SDK和适配器:

https://developers.google.com/mobile-ads-sdk/ad-network-mediation

然后我像这样创建了一个新的DfpAdView

final DfpAdView ad = new DfpAdView(this, AdSize.BANNER, /* my ad id here */);
adView.addView(ad);
ad.loadAd(new AdRequest());

当我发出广告请求时,我收到以下异常:

09-05 09:16:00.703: E/Ads(10863): Cannot find adapter class 'GADMAdapterCustomEvents'. Did you link the ad network's mediation adapter? Skipping ad network.
09-05 09:16:00.703: E/Ads(10863): java.lang.ClassNotFoundException: GADMAdapterCustomEvents
09-05 09:16:00.703: E/Ads(10863):   at java.lang.Class.classForName(Native Method)
09-05 09:16:00.703: E/Ads(10863):   at java.lang.Class.forName(Class.java:217)
09-05 09:16:00.703: E/Ads(10863):   at java.lang.Class.forName(Class.java:172)
09-05 09:16:00.703: E/Ads(10863):   at com.google.ads.g.a(SourceFile:133)
09-05 09:16:00.703: E/Ads(10863):   at com.google.ads.i.run(SourceFile:116)
09-05 09:16:00.703: E/Ads(10863):   at android.os.Handler.handleCallback(Handler.java:615)
09-05 09:16:00.703: E/Ads(10863):   at android.os.Handler.dispatchMessage(Handler.java:92)
09-05 09:16:00.703: E/Ads(10863):   at android.os.Looper.loop(Looper.java:137)
09-05 09:16:00.703: E/Ads(10863):   at android.app.ActivityThread.main(ActivityThread.java:4745)
09-05 09:16:00.703: E/Ads(10863):   at java.lang.reflect.Method.invokeNative(Native Method)
09-05 09:16:00.703: E/Ads(10863):   at java.lang.reflect.Method.invoke(Method.java:511)
09-05 09:16:00.703: E/Ads(10863):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-05 09:16:00.703: E/Ads(10863):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-05 09:16:00.703: E/Ads(10863):   at dalvik.system.NativeStart.main(Native Method)
09-05 09:16:00.703: E/Ads(10863): Caused by: java.lang.NoClassDefFoundError: GADMAdapterCustomEvents
09-05 09:16:00.703: E/Ads(10863):   ... 14 more
09-05 09:16:00.703: E/Ads(10863): Caused by: java.lang.ClassNotFoundException: GADMAdapterCustomEvents
09-05 09:16:00.703: E/Ads(10863):   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
09-05 09:16:00.703: E/Ads(10863):   at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
09-05 09:16:00.703: E/Ads(10863):   at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
09-05 09:16:00.703: E/Ads(10863):   ... 14 more

1 个答案:

答案 0 :(得分:1)

AdMob Mediation每个平台(Android / iOS)都有不同的广告ID(中介ID),当您将iOS广告ID传递到Android DfpAdView时会出现此异常。