I see these errors in my game console. Does anyone know how to best deal with OOM errors in a room?
java.lang.OutOfMemoryError: at android.database.CursorWindow.nativeGetString (Native Method) at android.database.CursorWindow.getString (CursorWindow.java:451) at android.database.AbstractWindowedCursor.getString (AbstractWindowedCursor.java:51) at org.walleth.data.transactions.TransactionDAO_Impl$8.compute (TransactionDAO_Impl.java:1272) at org.walleth.data.transactions.TransactionDAO_Impl$8.compute (TransactionDAO_Impl.java:1212) at android.arch.lifecycle.ComputableLiveData$2.run (ComputableLiveData.java:87) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607) at java.lang.Thread.run (Thread.java:762)
Transfer huge data at once?
If this is a list that you are filling out, you can do it lazily and get it 100 per 100, for example.
Also if your answer from the database contains many columns, SELECT ones you use.
SELECT
Increase heap size in module.gradle file in application
Source: https://habr.com/ru/post/1273641/More articles:Unknown annotations are not ignored in Class.getAnnotations on Android Jelly Bean - javaUse the Google Assistant to talk directly with my Android application and complete a very simple task - androidHow to file resizing input in Tensorflow - pythonError: execution failed for task ': app: transformDexArchiveWithExternalLibsDexMergerForDebug'. > - javaUpdate gradle to 4.1 in Android Studio - androidSocket option SO_ATTACH_REUSEPORT_CBPF - linuxUnable to accept self-signed certificate in Safari 11 to access Vagrant / Homestead local site - safariWebClient.DownloadString with HTTPS "Authentication or Decryption Error" - c #Verifying a self-signed certificate on the local Laravel Homestead server - phpGenerating data from an exponential distribution by including a correlation between two random variables - rAll Articles