当网页通过javascript在Froyo中请求定位时,Android Webview会崩溃

时间:2014-05-30 08:29:26

标签: android webview geolocation webkit

我有一个webview,当我进入一个javascript请求使用其位置的权限的页面时,它崩溃了。顺便说一句,这只发生在运行Froyo的设备上。

这是logcat:

Ljava/lang/RuntimeException;: Unable to instantiate Application():java.lang.NullPointerException
    at android.app.ActivityThread.attach(ActivityThread.java:4571)
    at android.app.ActivityThread.systemMain(ActivityThread.java:4606)
    at android.webkit.GeolocationService.<init>(GeolocationService.java:54)
    at android.webkit.LoadListener.nativeFinished(Native Method)
    at android.webkit.LoadListener.tearDown(LoadListener.java:1200)
    at android.webkit.LoadListener.handleEndData(LoadListener.java:721)
    at android.webkit.LoadListener.handleMessage(LoadListener.java:219)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:621)
    at java.lang.Thread.run(Thread.java:1096)
Caused by:
Ljava/lang/NullPointerException;:
    at android.content.res.Resources.updateConfiguration(Resources.java:1337)
    at android.app.ActivityThread.getSystemContext(ActivityThread.java:2417)
    at android.app.ActivityThread.attach(ActivityThread.java:4565)
    at android.app.ActivityThread.systemMain(ActivityThread.java:4606)
    at android.webkit.GeolocationService.<init>(GeolocationService.java:54)
    at android.webkit.LoadListener.nativeFinished(Native Method)
    at android.webkit.LoadListener.tearDown(LoadListener.java:1200)
    at android.webkit.LoadListener.handleEndData(LoadListener.java:721)
    at android.webkit.LoadListener.handleMessage(LoadListener.java:219)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:621)
    at java.lang.Thread.run(Thread.java:1096)
 "WebViewCoreThread" prio=5 tid=15 NATIVE
   | group="main" sCount=0 dsCount=0 s=N obj=0x440fe658 self=0x3c37b0
   | sysTid=480 nice=0 sched=0/0 cgrp=default handle=3946736
   | schedstat=( 23740425422 6099590333 2085 )
   at android.webkit.LoadListener.nativeFinished(Native Method)
   at android.webkit.LoadListener.tearDown(LoadListener.java:1200)
   at android.webkit.LoadListener.handleEndData(LoadListener.java:721)
   at android.webkit.LoadListener.handleMessage(LoadListener.java:219)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:123)
   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:621)
   at java.lang.Thread.run(Thread.java:1096)

0 个答案:

没有答案