我在 android 中实现了中介广告,但它没有显示我目前在广告网络中介中使用 AdMob House Ads 和 Hunt Mobile Ads。
我实现了 xml 和 java 编码方式,但都不适合我。
我的xml代码
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="6cd435789dcc43c0"
ads:loadAdOnCreate="true" />
并且日志猫错误是
01-23 19:13:10.079: E/Ads(1771): Cannot find adapter class 'com.huntmads.admobadaptor.HuntMadsAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
01-23 19:13:10.079: E/Ads(1771): java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.classForName(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:217)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:172)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.g.a(SourceFile:133)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.i.run(SourceFile:116)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.handleCallback(Handler.java:605)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 19:13:10.079: E/Ads(1771): at android.os.Looper.loop(Looper.java:137)
01-23 19:13:10.079: E/Ads(1771): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.NativeStart.main(Native Method)
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.NoClassDefFoundError: com/huntmads/admobadaptor/HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): ... 14 more
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-23 19:13:10.079: E/Ads(1771): ... 14 more