5

I know this link alreday post this question -Universal-Image-Loader: OutOfMemory Error

But Lot Of Images arising problem OutOfMemoryError I m using below

protected ImageLoader imageLoader = ImageLoader.getInstance();

DisplayImageOptions options = new DisplayImageOptions.Builder()
        .showImageOnLoading(R.drawable.aboutlogoicn)
        .showImageForEmptyUri(R.drawable.aboutlogoicn)
        .showImageOnFail(R.drawable.aboutlogoicn)
        .cacheInMemory(true)
        .cacheOnDisc(true)
        .considerExifParams(true)
        .bitmapConfig(Bitmap.Config.RGB_565)
        .build();

And ImageConfiguration

 ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
    .memoryCache(new WeakMemoryCache())
    .denyCacheImageMultipleSizesInMemory()
    .discCache(new UnlimitedDiscCache(cacheDir))
        .enableLogging()
    .build();

This Type of error arising

java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)

at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:546)

Wcom.nostra13.universalimageloader.core.decode.BaseImageDecoder.decodeStream(BaseImageDecoder.java:170)

at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode(BaseImageDecoder.java:73)

at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage(LoadAndDisplayImageTask.java:307)

at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:253)

at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:128)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)

W/System.err(2291):     at java.lang.Thread.run(Thread.java:838)

I m using below 2 configuration after init displayimage called.In My Android Device Cache memory size 19Mb if i m loading another images then showing onLoadingFailed reason is out of memory error.I m using this link for reference -https://github.com/nostra13/Android-Universal-Image-Loader if any solution or another way plz help

Community
  • 1
  • 1
Sanket990
  • 665
  • 1
  • 10
  • 22
  • go to this:[http://stackoverflow.com/questions/13194098/universal-image-loader-outofmemory-error?lq=1](http://stackoverflow.com/questions/13194098/universal-image-loader-outofmemory-error?lq=1) – M D Jan 28 '14 at 04:29
  • I m already this link used but some images after arising outofmemory error. – Sanket990 Jan 28 '14 at 04:31
  • @Sanket990 look @ the github link of UIL. Scroll down and check point 4. – Raghunandan Jan 28 '14 at 04:40
  • I know step4 for solution but offline cache required in my app.so cacheInMemory i m use and WeakMemoryCache arising outof memory error how to handle . – Sanket990 Jan 28 '14 at 04:46
  • 4
    What do you want to do with the image? Basically, there's enough memory to load _one_ image. You may try the large memory option: `android:largeHeap="true"` – 18446744073709551615 Jan 28 '14 at 05:11
  • i m add this android:largeHeap="true" option arising outofmemory error when loading – Sanket990 Jan 28 '14 at 05:20

0 Answers0