In my Android app the WebView activity class has following line,
webView.addJavascriptInterface(new JSInterface(this), \"Android\");
And
Based on this documentation An ExceptionInInitializerError is thrown to indicate that an exception occurred during evaluation of a static initializer or the initializer for a static variable. Check your code has any static initialization logic.
java.lang.ExceptionInInitializerError android OS 11
if this is related to OkHttp then update your version 4.4.0.
In this version its fixed.
implementation 'com.squareup.okhttp3:logging-interceptor:4.4.0'
thanks.
Strange! But let me share my experience, maybe it can help someone!
Was working on an Android app that was previously being run without any issues.
After I rest my Android device and on the first install of App after the reset. I
got this exception java.lang.ExceptionInInitializerError
After that when I ran the app the exception was gone.
I don't know what happened, but the above steps just solved the issue.