问题描述
我遇到了这个问题,原来是包含一些ES6粗箭头的JavaScript
()=> {…}
函数(){…}
Genymotion模拟器不再抛出此错误。它仍在Android Studio仿真器上,但不影响JavaScript执行。
解决方法
我们无法运行在Genymotion模拟器上运行的基于IONIC框架构建的Android应用程序,尽管该应用程序可以在真实的硬件(真实的android手机)上正常运行。
我可以看到抛出了错误 No DRP key due to exception:java.lang.ClassNotFoundException:
com.android.webview.chromium.Drp
以下是logcat文件中完整日志的片段:
09-27 21:53:24.258 I/ActivityManager( 5528): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ionicframework.myappandroid393856/.MainActivity (has extras)} from uid 10008 on display 0
09-27 21:53:24.317 I/art ( 6438): Late-enabling -Xcheck:jni
09-27 21:53:24.318 I/ActivityManager( 5528): Start proc 6438:com.ionicframework.myappandroid393856/u0a60 for activity com.ionicframework.myappandroid393856/.MainActivity
09-27 21:53:24.375 W/System ( 6438): ClassLoader referenced unknown path: /data/app/com.ionicframework.myappandroid393856-1/lib/x86
09-27 21:53:24.480 V/WebViewFactory( 6438): webViewPackageName: com.android.webview
09-27 21:53:24.482 I/WebViewFactory( 6438): Loading com.android.webview version 44.0.2403.119 (code 246011910)
09-27 21:53:24.514 W/System ( 6438): ClassLoader referenced unknown path: /system/app/webview/lib/x86
09-27 21:53:24.526 I/LibraryLoader( 6438): Time to load native libraries: 1 ms (timestamps 8014-8015)
09-27 21:53:24.532 I/LibraryLoader( 6438): Expected native library version number "",actual native library version number ""
09-27 21:53:24.577 V/WebViewChromiumFactoryProvider( 6438): Binding Chromium to main looper Looper (main,tid 1) {10f7532}
09-27 21:53:24.578 I/LibraryLoader( 6438): Expected native library version number "",actual native library version number ""
09-27 21:53:24.578 I/chromium( 6438): [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0,default verbosity = 0
09-27 21:53:24.589 I/BrowserStartupController( 6438): Initializing chromium process,singleProcess=true
09-27 21:53:24.589 W/art ( 6438): Attempt to remove non-JNI local reference,dumping thread
09-27 21:53:24.590 E/SysUtils( 6438): ApplicationContext is null in ApplicationStatus
09-27 21:53:24.659 W/chromium( 6438): [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
09-27 21:53:24.676 D/libEGL ( 6438): loaded /system/lib/egl/libEGL_emulation.so
09-27 21:53:24.677 D/libEGL ( 6438): loaded /system/lib/egl/libGLESv1_CM_emulation.so
09-27 21:53:24.697 D/libEGL ( 6438): loaded /system/lib/egl/libGLESv2_emulation.so
09-27 21:53:24.704 E/libEGL ( 6438): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-27 21:53:24.704 E/libEGL ( 6438): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-27 21:53:24.705 D/ ( 6438): HostConnection::get() New Host Connection established 0xe8a614f0,tid 6438
09-27 21:53:24.881 E/eglCodecCommon( 6438): glUtilsParamSize: unknow param 0x00008d57
09-27 21:53:25.010 W/AudioManagerAndroid( 6438): Requires BLUETOOTH permission
09-27 21:53:25.070 E/DataReductionProxySettingListener( 6438): No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
09-27 21:53:25.108 W/art ( 6438): Attempt to remove non-JNI local reference,dumping thread
09-27 21:53:25.140 W/AwContents( 6438): onDetachedFromWindow called when already detached. Ignoring
09-27 21:53:25.154 D/SystemWebViewEngine( 6438): CordovaWebView is running on device made by: Genymotion
09-27 21:53:25.163 W/art ( 6438): Attempt to remove non-JNI local reference,dumping thread
09-27 21:53:25.163 W/art ( 6438): Attempt to remove non-JNI local reference,dumping thread
09-27 21:53:25.174 E/Surface ( 5893): getSlotFromBufferLocked: unknown buffer: 0xe8a03180
09-27 21:53:25.267 D/OpenGLRenderer( 6438): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-27 21:53:25.332 V/StatusBar( 6438): StatusBar: initialization