Volley library getting out of memory error

前端 未结 4 1606
没有蜡笔的小新
没有蜡笔的小新 2020-12-19 17:56
java.lang.OutOfMemoryError: Failed to allocate a 1465140570 byte allocation with 1622964 free bytes and 509MB until OOM
    at com.android.volley.toolbox.DiskBasedCa         


        
4条回答
  •  清酒与你
    2020-12-19 18:46

    OutOfMemoryError occurs when you try to load large data into your app's memory that exceeds the available RAM. I do not know what you are using volley for at the moment but try disabling cache for volley see here or not load a huge file at once or try compressing the file. It would help if you give more detail on what you are trying to achieve and the code section that is causing the error.

提交回复
热议问题