Hello,
I know it may sound a bit crazy but I am trying to use the android_webview APK provided inside Chromium along with trying to instantiate the system WebView. Inside the AwShellActivity I am trying to instantiate a android.webkit.WebView and I am getting the following exception:
03-11 18:47:59.761 13172 13172 E AndroidRuntime: java.nio.channels.OverlappingFileLockException
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1061)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at java.nio.channels.FileChannel.tryLock(FileChannel.java:977)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at com.android.webview.chromium.WebViewChromiumFactoryProvider.startChromiumLocked(WebViewChromiumFactoryProvider.java:15122)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at com.android.webview.chromium.WebViewChromiumFactoryProvider.ensureChromiumStartedLocked(WebViewChromiumFactoryProvider.java:347)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at com.android.webview.chromium.WebViewChromiumFactoryProvider.startYourEngines(WebViewChromiumFactoryProvider.java:440)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:162)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.webkit.WebView.<init>(WebView.java:636)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.webkit.WebView.<init>(WebView.java:572)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.webkit.WebView.<init>(WebView.java:555)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.webkit.WebView.<init>(WebView.java:542)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.webkit.WebView.<init>(WebView.java:532)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at org.chromium.android_webview.shell.AwShellActivity$WebView.<init>(AwShellActivity.java:146)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at org.chromium.android_webview.shell.AwShellActivity$7.run(AwShellActivity.java:1079)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
03-11 18:47:59.761 13172 13172 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
03-11 18:47:59.763 991 31400 W ActivityManager: Force finishing activity org.chromium.android_webview.shell/.AwShellActivity
Kind of makes sense that both the webview from the AwShellActivity and the android.webkit.WebView are both trying to lock the same resource, but is there a possible solution to this?
I think the solution could be to use tabs in full chromium instead of the webview example, but it would be great if I could resolve this in the android_webview APK example as I already have much code tight to it.
Is there a way to instantiate 2 webview instances?
Thank you very much as usual.