android2.3上用WebView組件js和java相互調用報錯

來源:互聯網
上載者:User
07-01 16:02:12.922: W/KeyCharacterMap(1901): No keyboard for id 007-01 16:02:12.952: W/KeyCharacterMap(1901): Using default keymap: /system/usr/keychars/qwerty.kcm.bin07-01 16:02:22.002: W/dalvikvm(1901): JNI WARNING: jarray 0x40550938 points to non-array object (Ljava/lang/String;)07-01 16:02:22.114: I/dalvikvm(1901): "WebViewCoreThread" prio=5 tid=9 NATIVE07-01 16:02:22.134: I/dalvikvm(1901):   | group="main" sCount=0 dsCount=0 obj=0x4051deb8 self=0x2a4b8807-01 16:02:22.134: I/dalvikvm(1901):   | sysTid=1909 nice=0 sched=0/0 cgrp=default handle=277216007-01 16:02:22.182: I/dalvikvm(1901):   | schedstat=( 2432291748 2800672977 219 )07-01 16:02:22.182: I/dalvikvm(1901):   at android.webkit.WebViewCore.nativeTouchUp(Native Method)07-01 16:02:22.182: I/dalvikvm(1901):   at android.webkit.WebViewCore.nativeTouchUp(Native Method)07-01 16:02:22.182: I/dalvikvm(1901):   at android.webkit.WebViewCore.access$3300(WebViewCore.java:53)07-01 16:02:22.182: I/dalvikvm(1901):   at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1158)07-01 16:02:22.241: I/dalvikvm(1901):   at android.os.Handler.dispatchMessage(Handler.java:99)07-01 16:02:22.241: I/dalvikvm(1901):   at android.os.Looper.loop(Looper.java:123)07-01 16:02:22.241: I/dalvikvm(1901):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:629)07-01 16:02:22.241: I/dalvikvm(1901):   at java.lang.Thread.run(Thread.java:1019)07-01 16:02:22.241: E/dalvikvm(1901): VM aborting

Android2.3中Webkit引擎導致VM崩潰的問題 


 
Android2.2,2.3,2.3.3都存在的一個bug,在這裡有詳細的描述。 
http://code.google.com/p/android/issues/detail?id=12987 
問題的核心在於這樣一句話:JNI WARNING: jarray 0x4074f6e0 points to non-array object (Ljava/lang/String;) 
也就是進行JNI調用時,把一個Java中的String對象當數組來訪問了,最終導致虛擬機器崩潰。 

基本算是一個比較嚴重的BUG,沒辦法解決,所以如果說用WebView組件想在js和java之間相互調用的話就沒辦法適應所有機型,所以做android原生應用程式時最好不要用WebView組件,否則2.3系統會直接崩潰掉。


這個問題糾結死我了,快!!!!!!!!!!!!!!


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.