0

我尝试实施 Adwhril 并向其中添加 Millenial Media、ZestAdz 和 InMobi 网络。我还设置了内部广告以供备份。

现在的问题是,当 Adwhril 尝试从 InMobi 显示广告时,会出现一个大的空白黑屏,并且应用程序挂起,之后什么也没有发生。一切都卡住了。它甚至没有抛出任何警告或错误。

只有显示的广告是我的 HouseAd(自定义广告)。除了 HouseAd 之外,其他广告均未显示 :(

当它尝试显示来自 Millenial Ads 的广告时,我收到以下错误:

09-06 21:37:04.227: D/AdWhirl SDK(281): Valid adapter, calling handle()
09-06 21:37:04.234: W/AdWhirl SDK(281): Caught an exception in adapter:
09-06 21:37:04.234: W/AdWhirl SDK(281): java.lang.NoSuchMethodError: com.millennialmedia.android.MMAdView.<init>
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.adwhirl.adapters.MillennialAdapter.handle(MillennialAdapter.java:77)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.adwhirl.adapters.AdWhirlAdapter.handle(AdWhirlAdapter.java:168)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:231)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.adwhirl.AdWhirlLayout.access$300(AdWhirlLayout.java:53)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:399)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at android.os.Handler.handleCallback(Handler.java:587)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at android.os.Handler.dispatchMessage(Handler.java:92)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at android.os.Looper.loop(Looper.java:123)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at android.app.ActivityThread.main(ActivityThread.java:4627)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at java.lang.reflect.Method.invokeNative(Native Method)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at java.lang.reflect.Method.invoke(Method.java:521)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-06 21:37:04.234: W/AdWhirl SDK(281):     at dalvik.system.NativeStart.main(Native Method)
09-06 21:37:04.234: D/AdWhirl SDK(281): Showing ad:
09-06 21:37:04.234: D/AdWhirl SDK(281):     nid: xxxxxxxxxxxxxxxxxxxxxxxxxxx
09-06 21:37:04.234: D/AdWhirl SDK(281):     name: custom
09-06 21:37:04.234: D/AdWhirl SDK(281):     type: 9
09-06 21:37:04.234: D/AdWhirl SDK(281):     key: __CUSTOM__
09-06 21:37:04.234: D/AdWhirl SDK(281):     key2: 
09-06 21:37:04.234: D/AdWhirl SDK(281): Generic adapter will get destroyed

当它尝试显示 ZestAdz 时,我收到以下消息

09-06 22:02:44.063: D/AdWhirl SDK(328): Showing ad:
09-06 22:02:44.063: D/AdWhirl SDK(328):     nid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
09-06 22:02:44.063: D/AdWhirl SDK(328):     name: zestadz
09-06 22:02:44.063: D/AdWhirl SDK(328):     type: 20
09-06 22:02:44.063: D/AdWhirl SDK(328):     key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
09-06 22:02:44.063: D/AdWhirl SDK(328):     key2: 
09-06 22:02:44.063: W/AdWhirl SDK(328): Unsupported ration type: 20
09-06 22:02:44.122: D/dalvikvm(328): GC_FOR_MALLOC freed 2068 objects / 351008 bytes in 53ms
09-06 22:02:44.132: W/AdWhirl SDK(328): Caught an exception in adapter:
09-06 22:02:44.132: W/AdWhirl SDK(328): java.lang.Exception: Invalid adapter
09-06 22:02:44.132: W/AdWhirl SDK(328):     at com.adwhirl.adapters.AdWhirlAdapter.handle(AdWhirlAdapter.java:170)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:231)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at com.adwhirl.AdWhirlLayout.access$300(AdWhirlLayout.java:53)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:399)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at android.os.Handler.handleCallback(Handler.java:587)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at android.os.Handler.dispatchMessage(Handler.java:92)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at android.os.Looper.loop(Looper.java:123)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at android.app.ActivityThread.main(ActivityThread.java:4627)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at java.lang.reflect.Method.invokeNative(Native Method)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at java.lang.reflect.Method.invoke(Method.java:521)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-06 22:02:44.132: W/AdWhirl SDK(328):     at dalvik.system.NativeStart.main(Native Method)

谁能指出我做错了什么并指导我如何解决这个问题?

谢谢你!!

4

1 回答 1

0

确保您已包含最新版本的适配器和 SDK。还要检查您是否已在 adwhirl 站点中添加了您正在集成的网络的网络 ID。

这是使用相同的示例代码。在xml文件中添加

<com.adwhirl.AdWhirlLayout
    android:id="@+id/adwhirl_layout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />

代码更改:

AdWhirlLayout adWhirlLayout2 = new AdWhirlLayout(this,"46a9e26bb1f5499ab7b00c9807ae034b");
adWhirlLayout2.setAdWhirlInterface(this);
adWhirlLayout2.setMaxWidth(width);
adWhirlLayout2.setMaxHeight(height);
AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);
RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(
        LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
adWhirlLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
layout.setGravity(Gravity.CENTER_HORIZONTAL);
layout.addView(adWhirlLayout2, adWhirlLayoutParams);

不要忘记权限。

请发布您的代码。它将更容易调试。如有任何疑问,请联系 helpdesk@inmobi.com

于 2012-09-07T10:01:57.533 回答