AdWhirl与Admob错误修复

时间:2012-01-06 05:18:07

标签: android admob adwhirl

已更新至最新版本的AdWhirl和AdMob SDK,但在Android 2.1-update1中从AdMob SDK获取已知错误。在此帖子https://groups.google.com/forum/#!topic/google-admob-ads-sdk/cNxRgIUHJH0

中找到

但它只是指AdMob而不是AdWhirl任何线索可以对AdWhirl SDK进行哪些更改来修复此问题?

提前致谢!

java.lang.NullPointerException
    at android.webkit.WebView.getSettings(WebView.java:2791)
    at android.webkit.WebView.onWindowFocusChanged(WebView.java:3616)
    at android.view.View.dispatchWindowFocusChanged(View.java:3764)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:754)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1819)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4370)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    at dalvik.system.NativeStart.main(Native Method)

这个怎么样:

java.lang.NullPointerException
at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:227)
at com.adwhirl.AdWhirlLayout.access$3(AdWhirlLayout.java:215)
at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:410)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)

2 个答案:

答案 0 :(得分:0)

问题不在AdWhirl代码中,甚至在AdMob代码中。这是Android WebView中的NullPointerException,并且AdMob / AdWhirl代码没有已知的解决方法。这不应该经常发生,但如果它确实是一个交易破坏者,您可能想要拒绝您发送给AdMob的请求数量。

答案 1 :(得分:0)

是的,我也有这个问题。

我的解决方法:扩展AdWhirlLayout,覆盖dispatchWindowFocusChanged以及发生此异常的所有其他方法并捕获异常。