安卓:NullPointerException异常上的WebView [英] Android: NullPointerException on webview

查看:1649
本文介绍了安卓:NullPointerException异常上的WebView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有这个问题?我不太明白如何解决它。不知道是我的code造成网页视图此异常或错误。


  

显示java.lang.NullPointerException在
  android.webkit.WebViewClassic $ WebViewInputConnection.setNewText(WebViewClassic.java:587)
  在
  android.webkit.WebViewClassic $ WebViewInputConnection.setComposingText(WebViewClassic.java:327)
  在
  android.webkit.WebViewClassic $ WebViewInputConnection.commitText(WebViewClassic.java:343)
  在
  com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:279)
  在
  com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:77)
  在android.os.Handler.dispatchMessage(Handler.java:107)在
  android.os.Looper.loop(Looper.java:194)在
  android.app.ActivityThread.main(ActivityThread.java:5371)在
  java.lang.reflect.Method.invokeNative(本机方法)的
  java.lang.reflect.Method.invoke(Method.java:525)在
  com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:833)
  在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)在
  dalvik.system.NativeStart.main(本机方法)



解决方案

 显示java.lang.NullPointerException
在android.webkit.WebViewClassic $ WebViewInputConnection.setNewText(WebViewClassic.java:587)
在android.webkit.WebViewClassic $ WebViewInputConnection.setComposingText(WebViewClassic.java:327)
在com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:333)

我昨天得到了同样的错误,我想这是从全新的lib产生的Google Play-services.jar

如果您发现该片段中,的AdMob 更新是强制性的,以缓解这一问题。

Does anyone have this problem? I am not quite understand how to fix it. Not sure is that my code cause this exception or a bug on a webview.

java.lang.NullPointerException at android.webkit.WebViewClassic$WebViewInputConnection.setNewText(WebViewClassic.java:587) at android.webkit.WebViewClassic$WebViewInputConnection.setComposingText(WebViewClassic.java:327) at android.webkit.WebViewClassic$WebViewInputConnection.commitText(WebViewClassic.java:343) at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:279) at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:77) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5371) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

解决方案

java.lang.NullPointerException
at android.webkit.WebViewClassic$WebViewInputConnection.setNewText(WebViewClassic.java:587)
at android.webkit.WebViewClassic$WebViewInputConnection.setComposingText(WebViewClassic.java:327)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:333)

I got the same error yesterday, I think it is generated from lib of new google-play-services.jar.

If you observe the snippet, admob update is mandatory to mitigate the issue.

这篇关于安卓:NullPointerException异常上的WebView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆