Reputation: 55
I have trouble with my android project, I did not touch anything and suddenly my app stopped working because of this error. Do you have some idea about what is happening? The error is this:
10-30 22:53:38.246: E/AndroidRuntime(19137): FATAL EXCEPTION: Thread-1210
10-30 22:53:38.246: E/AndroidRuntime(19137): java.lang.OutOfMemoryError
10-30 22:53:38.246: E/AndroidRuntime(19137): at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:316)
10-30 22:53:38.246: E/AndroidRuntime(19137): at com.android.volley.toolbox.DiskBasedCache.readString(DiskBasedCache.java:526)
10-30 22:53:38.246: E/AndroidRuntime(19137): at com.android.volley.toolbox.DiskBasedCache.readStringStringMap(DiskBasedCache.java:549)
10-30 22:53:38.246: E/AndroidRuntime(19137): at com.android.volley.toolbox.DiskBasedCache$CacheHeader.readHeader(DiskBasedCache.java:392)
10-30 22:53:38.246: E/AndroidRuntime(19137): at com.android.volley.toolbox.DiskBasedCache.initialize(DiskBasedCache.java:155)
10-30 22:53:38.246: E/AndroidRuntime(19137): at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:85)
please help me!!
Upvotes: 5
Views: 1903
Reputation: 397
you can detect you memory leaks from Memory analyzer in eclipse which is taking much space and optimize your code by that
Upvotes: 2
Reputation: 2606
-If the problem is due to Bitmaps then use
Lazy Imageloader for Bitmaps in listviews
-Make sure you dnt have too much work in its background task.
-And if possible please post your code from where you are getting this issue so we can also learn from it . THanks! :)
Upvotes: 3
Reputation:
This thing can be an easy fix for this
just add this line in your application tag in manifest file
android:largeHeap="true"
like this
<application
android:largeHeap="true"
android:allowBackup="true"
......
Upvotes: 2