Cannot load WebView: java.lang.UnsatisfiedLinkError, the library is 64-bit instead of 32-bit

I run an Activity that has its own web browser android.webkit.WebView, I get the following error on a 64-bit device.

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

Please provide some valuable suggestions.

+4
source share
1 answer

I just ran into the same error while running tests on a remote device in a device farm. This is a Samsung S6 device running Android 6. I don’t think it is particularly specific, and this problem can occur on different devices and OS versions.

Our automated tests failed with the same error:

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)

. , . 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
+1

All Articles