Error when loading a few images: java.lang.OutOfMemoryError


I load only 5 images (but large dimensions : 3000*4000). Then my app crashes with this error:


Or sometimes this error:

An uncaught Exception occurred on "AsyncTask #3" thread.
java.lang.RuntimeException: An error occured while executing doInBackground()
 at org.nativescript.widgets.image.AsyncTask$3.done(
 at java.util.concurrent.FutureTask.finishCompletion(
 at java.util.concurrent.FutureTask.setException(
 at java.util.concurrent.ThreadPoolExecutor.runWorker(
 at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available

Any idea?


Optimize your images and use a plugin -


I installed this on the server and it has stopped our memory issues.


I think the solution is mentioned here in github issue.