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

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -