android - OutOfMemoryError - DiskBasedCache crash -


i started receiving crash :

non-fatal exception: java.lang.outofmemoryerror     failed allocate 2037654060 byte allocation 33554336 free bytes , 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); parsenetworkresponse callback method doesn't solve issue.

in manifest add android:largeheap="true" , read these http://android-developers.blogspot.in/2009/01/avoiding-memory-leaks.html


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -