Troubleshooting
Android - Troubleshooting
DEPRECATION NOTICE
On March 31, 2025, Taboola will sunset SDK 2.
Before then, please make sure to migrate to SDK 4 for Android.
Using WebView from more than one process at once
Issue
RuntimeException: Using WebView from more than one process at once
.
Cause
Typically, occurs when multiple processes within 1 app use web views.
TBLClassicUnit
extendsWebView
, and must be treated as aWebView
in this regard.
Resolution
Make sure that your app uses 1 process to manage all web views.
In the words of the WebView JavaDoc:
Most applications should simply ensure that all components of the app that rely on WebView are in the same proces, to avoid needing multiple data directories.
Alternative Resolution
If you are unable to implement the above resolution, then you can try the following:
Make sure that each process in your app calls the WebView.setDataDirectorySuffix(<Process-specific data directory>)
method, before creating or using a WebView
instance.
TBLClassicUnit
extendsWebView
, and must be treated as aWebView
in this regard.
Resources
Updated 2 months ago