我启动一个具有android原生webView(android.webkit.WebView)的Activity,我在64位设备中得到以下错误.
error instantiating provider java.lang.RuntimeException: Cannot load WebView
at org.chromium.android_webview.AwBrowserProcess.loadLibrary(AwBrowserProcess.java:52)
Caused by: org.chromium.base.library_loader.ProcessInitException
Caused by: java.lang.UnsatisfiedLinkError: dlopen Failed: "/data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so" is 32-bit instead of 64-bit
请提供一些有价值的建议.
最佳答案
我在设备群中的远程设备上运行测试时遇到了同样的错误.这是运行Android 6的三星S6设备.我认为这两者都不是特别具体,这个问题很可能发生在各种设备和操作系统版本上.
原文链接:https://www.f2er.com/android/430018.htmlCaused by: java.lang.UnsatisfiedLinkError: dlopen Failed: "/data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so" is 32-bit instead of 64-bit
at java.lang.Runtime.loadLibrary(Runtime.java:372)
这些错误已经发生了好几天.我设法以交互方式连接到设备,发现我们的应用程序无法启动它.然后我检查了Google Play并发现有各种待更新的更新,包括Android System WebView的更新,这是31周前的最新更新.
我决定更新那一项,然后再次尝试运行我们的应用程序.我们的应用现在有效.
线索是上面@Ironman提供的链接中的讨论
https://bugs.chromium.org/p/chromium/issues/detail?id=547842包括一个已经从32位操作系统升级到64位操作系统的设备但不知何故Google Play仍在发送一个32位的WebView二进制文件.无论如何……关键是问题与WebView组件的二进制文件的旧版本不正确有关.
顺便说一句,我认为当我们更新各种组件并在我们的应用程序的gradle配置中进行gradle时,问题浮出水面. https://github.com/kiwix/kiwix-android/commit/1e03a4ae72f8fe5a9a133913e110add7f3a37631
04-12 17:40:09.605 7979 7979 E dex2oat : Failed to create oat file: /data/dalvik-cache/arm64/data@app@com.google.android.webview-1@base.apk@classes.dex: Permission denied
04-12 17:40:09.615 7946 7946 W art : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.google.android.webview-1/base.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.google.android.webview-1@base.apk@classes.dex) because non-0 exit status
04-12 17:40:09.715 7946 7946 E cr_LibraryLoader: Unable to load library: webviewchromium
04-12 17:40:09.715 7946 7946 E WebViewFactory: error instantiating provider
04-12 17:40:09.715 7946 7946 E WebViewFactory: java.lang.reflect.InvocationTargetException
-- cut --
04-12 17:40:09.715 7946 7946 E WebViewFactory: Caused by: java.lang.UnsatisfiedLinkError: dlopen Failed: "/data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so" is 32-bit instead of 64-bit
-- cut --
04-12 17:40:09.725 7946 7946 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dlopen Failed: "/data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so" is 32-bit instead of 64-bit