Hi folks, I’m having some issues with the UnityAds SDK, the class WebViewApp is throwing a java.lang.OutOfMemoryError from 3 different lines 120, 130 and 131, highlighted below:
Maybe, changing the line 119 from this private void invokeJavascriptMethod(String className, String methodName, JSONArray params) throws JSONException { to this private void invokeJavascriptMethod(String className, String methodName, JSONArray params) throws JSONException, OutOfMemoryError {, will hold the exception inside the try/catch here and solve the issue?
From looking at the specs of those devices they all seem to be fairly low power. Most of them have <2gb ram. From the logs you posted the issue simply seems to be that those devices are actually out of memory, and therefore the Ads SDK isn’t able to allocate the memory it needs to perform correctly.
We have seen this error before and typically the issue is due to the developer’s app using too much memory and not leaving enough for the Ads SDK. I would recommend trying to update to the latest version of our SDK and if that fails, you might have some success addressing your app’s overall memory usage.