I suddenly started receiving this crash :
Non-fatal Exception: java.lang.OutOfMemoryError
Failed to allocate a 2037654060 byte allocation with 33554336 free bytes and 170MB until OOM
Raw
com.android.volley.toolbox.DiskBasedCache.streamToBytes (DiskBasedCache.java:322)
com.android.volley.toolbox.DiskBasedCache.readString (DiskBasedCache.java:532)
com.android.volley.CacheDispatcher.run (CacheDispatcher.java:84)
my parseNetworkResponse:
@Override
protected Response<T> parseNetworkResponse(NetworkResponse response) {
try {
String json = new String( response.data, HttpHeaderParser.parseCharset(response.headers));
return Response.success( gson.fromJson(json, class), HttpHeaderParser.parseCacheHeaders(response));
I've tried adding setShouldCache(false);
to the parseNetworkResponse callback method but that doesn't solve the issue.