0

when i using volley in my app, sometime it crash, the log is

java.lang.OutOfMemoryError
at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:316)
at com.android.volley.toolbox.DiskBasedCache.readString(DiskBasedCache.java:526)
at com.android.volley.toolbox.DiskBasedCache.readStringStringMap(DiskBasedCache.java:549)
at com.android.volley.toolbox.DiskBasedCache$CacheHeader.readHeader(DiskBasedCache.java:392)
at com.android.volley.toolbox.DiskBasedCache.initialize(DiskBasedCache.java:155)
at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:84)

any ideas is thankful

perry
  • 856
  • 1
  • 10
  • 22
  • search google or stackoverflow for "android memory leak" and you get the answer. i.e. http://stackoverflow.com/questions/1147172/what-android-tools-and-methods-work-best-to-find-memory-resource-leaks – k3b Jul 07 '15 at 13:47
  • are using LRUcache ? maybe you need to increase the memory allocation! – neferpitou Jul 07 '15 at 14:24
  • yeah,i have been used lrucache? how do i increase the memory allocation,i used the system memory's 1/4,am i ok – perry Jul 10 '15 at 02:53
  • This is a known issue with Volley. See more at http://stackoverflow.com/a/42196956/901597 – Joe Bowbeer Feb 14 '17 at 00:49

0 Answers0