在Android 5.1.1上调用@JavascriptInterface方法时WebView崩溃

时间:2016-05-09 20:43:47

标签: android webview android-webview chromium

当我尝试调用@JavascriptInterface方法时,我特意在Android 5.1.1上遇到了Android Webview的问题。这只发生在以下条件下:

  • Android 5.1.1
  • 发布版本

因为这只发布在发布版本上,所以我尝试完全删除了Proguard,但我仍然看到了这个问题。在发布版本中还会发生什么导致这种情况发生?任何其他版本的Android 5.1.1也不会发生这种情况。

这是崩溃:

F/art     (24750): art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN 
APPLICATION: java_array == null
F/art     (24750): art/runtime/check_jni.cc:65]     in call to GetArrayLength
F/art     (24750): art/runtime/check_jni.cc:65]     from void org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(long, long)
F/art     (24750): art/runtime/check_jni.cc:65] "JavaBridge" prio=7 tid=53 Runnable
F/art     (24750): art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x13371190 self=0xaec3e000
F/art     (24750): art/runtime/check_jni.cc:65]   | sysTid=24904 nice=0 cgrp=default sched=0/0 handle=0xaec59f00
F/art     (24750): art/runtime/check_jni.cc:65]   | state=R schedstat=( 2767866 2376821 16 ) utm=0 stm=0 core=0 HZ=100
F/art     (24750): art/runtime/check_jni.cc:65]   | stack=0x950fc000-0x950fe000 stackSize=1036KB
F/art     (24750): art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #00 pc 00004e64  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #01 pc 00003665  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #02 pc 00256429  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+84)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #03 pc 00238fe7  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+158)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #04 pc 000b191b  /system/lib/libart.so (art::JniAbort(char const*, char const*)+610)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #05 pc 000b2055  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #06 pc 001ccaa5  /system/lib/libart.so (art::JNI::GetArrayLength(_JNIEnv*, _jarray*)+612)
F/art     (24750): art/runtime/check_jni.cc:65]   native: #07 pc 015f868d  /data/app/com.google.android.webview-2/lib/arm/libwebviewchromium.so (???)
F/art     (24750): art/runtime/check_jni.cc:65]   at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native method)
F/art     (24750): art/runtime/check_jni.cc:65]   at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
F/art     (24750): art/runtime/check_jni.cc:65]   at android.os.Handler.dispatchMessage(Handler.java:102)
F/art     (24750): art/runtime/check_jni.cc:65]   at android.os.Looper.loop(Looper.java:135)
F/art     (24750): art/runtime/check_jni.cc:65]   at android.os.HandlerThread.run(HandlerThread.java:61)
F/art     (24750): art/runtime/check_jni.cc:65]
F/google-breakpad(24905): -----BEGIN BREAKPAD MICRODUMP-----
F/google-breakpad(24905): V WebView:50.0.2661.86
F/google-breakpad(24905): O A arm 04 armv7l google/hammerhead/hammerhead:5.1.1/LMY48B/1863243:user/release-keys
F/google-breakpad(24905): G OpenGL ES 3.0 V@104.0 AU@  (GIT@Id3510ff6dc)|Qualcomm|Adreno (TM) 330
F/google-breakpad(24905): S 0 951FD180 951FD000 00001000
F/google-breakpad(24905): S 951FD000 

0 个答案:

没有答案