科尔多瓦网站并没有完全加载

时间:2018-03-16 23:02:41

标签: android cordova android-webview

我有我的Android原生项目,它有它的cordova SystemWebView init。 仅在真实设备上发生,而不在模拟器上: 适用于Android 6.0,但在Android 7.0及更高版本的设备上,网站无法加载,我收到此错误消息:

 Rejecting re-init on previously-failed class

 java.lang.Class<com.android.webview.chromium.db>: 
 java.lang.NoClassDefFoundError: Failed resolution of: 
 Landroid/webkit/RenderProcessGoneDetail;

 03-16 18:45:03.913 
 com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) 
 (WebViewChromium.java:42)

Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.db>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/RenderProcessGoneDetail;
at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42)
at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636)
at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572)
at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555)
at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542)
at void org.apache.cordova.engine.SystemWebView.<init>(android.content.Context, android.util.AttributeSet) (SystemWebView.java:47)

 Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.SafeBrowsingResponse" on path: DexPathList[[zip file "/data/app/com.android.chrome-1/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-1/lib/arm64, /data/app/com.android.chrome-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42)

1 个答案:

答案 0 :(得分:0)

该问题根本与科尔多瓦无关 Android 7.0+开始用%20(编码)替换URL中的空间字符,这会杀死JS端。