Shi*_*jil 7 64-bit android webview
我启动一个具有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
Run Code Online (Sandbox Code Playgroud)
请提供一些有价值的建议.
在设备场中的远程设备上运行测试时,我遇到了同样的错误。这是运行Android 6的Samsung S6设备。我认为这两者都不是特别具体,并且此问题很可能发生在各种设备和OS版本上。
我们的自动化测试失败,并出现相同的错误:
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
at java.lang.Runtime.loadLibrary(Runtime.java:372)
Run Code Online (Sandbox Code Playgroud)
这些错误已经发生了好几天。我设法以交互方式连接到设备,发现我们的应用无法在该设备上启动。然后,我检查了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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2954 次 |
| 最近记录: |