I'm developing an Android app for which I need to get some images from the server at runtime, so I I can get it thumbnail and then use these to get images:
ImageLoader configuration config = new ImageLoader configuration. Builder (getApplicationContext ()). Build (); . ImageLoader.getInstance () init (config); // get movie p.pster from private server to set private zeros rsource_session (image button image, string url) {loader = ImageLoader.getInstance (); Loader.displayImage (url, image); }
When there is a small amount of images, everything is fine, but when 100 about images ImageLoader
Likes 15 images from 10 then it passes me through that exception:
02-19 15: 14: 30.018: error / Diwikim-Hep (597): 1382416-Out of memory on byte allocation. 02-19 15: 14: 30.018: INFO / Diwikim (597): "UIL-Pool-1-Thread-1" PI = 4 TID = 16 Running 02-19 15: 14: 30.018: Information / Diwikam ( 597): | Group = "main" sCount = 0 dsCount = 0 obj = 0x413f6e18 self = 0x1e05c8 02-19 15: 14: 30.018: info / dwvik (597): | SysTid = 649 Good = 10 Fixed = 0/0 CGRP = BG_On_Interactive Handle = 2031848 02-19-15: 14: 30.018: INO / DALVIC (597): | schedstat = (17149851689 41024927609 1804) UTM = 1582 STM = 132 core = 0 02-19 15: 14: 30.018: Information / dalvikvm (597): android.graphics.BitmapFactory.nativeDecodeStream (Native Method) 15 02-19: 14: 30.018: information / dalvikvm (597): 14: 30.018: information / dalvikvm (597): android.graphics.BitmapFactory.decodeStream (BitmapFactory.java:493) on com.nostra13.universalimageloader.core at 02-19 15. decode.BaseImageDecoder.decode (BaseImageDecoder.java:78) 02-19 15: 14: 30.018: Information on 02-19 / dalvikvm (597): com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage (LoadAndDisplayImageTask.java:289) 15: 14: 30.018: information / dalvikvm (597): 14: 30.018: information / dalvikvm (597): com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap (LoadAndDisplayImageTask.java:245) at com at 02-19 15. Nostra13.universalimageloader.core.LoadAndDisplayImageTask.run (LoadAndDisplayImageTask.java:141) 02-19 15: 14: 30.018: info / dalvikvm (597): java.util.concurrent.ThreadPoolExecutor.runWorker (Java on ThreadPoolExecutor: 1076) 02- 19 15: 14: 30.018: information / dalvikvm (597): 14: 30.018: information java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:569) on 02-19 / 15 Dilvikvm (597): JavaThread Thredkrn (Thredkjawa: 856) 02-19 15: 14: 30.108: Debug / Skiya (597) --- Dikoder-> decode returned liar 02-19 15: 15: 10.008: Error / ImageLoader (597 ): null 02-19 15: 15: 10.008: error / ImageLoader (597): java.lang.OutOfMemoryError 02-19 15: 15: 10.008: error / ImageLoader (597): 15 :: 10.008: error / ImageLoader (597 ): android.graphics.BitmapFactory.nativeDecodeStream (Native method) at 02-19 android.graphics.BitmapFactory.decodeStream (BitmapFactory.java:493) on 02-19 15:15 15: 10.008: error / ImageLoader (597): 15: 10.008: error / ImageLoader (597): com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode (BaseImageDecoder.java:78) at com at 02-19 15. Nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage (LoadAndDisplayImageTask.java:289) 02-19 15:15:10 0.008: Error / ImageLoader (597): 15: 10.008: Error / ImageLoader (597): com.nostra13.universalimageloader. Core.LoadAndDisplayImageTask.tryLoadBitmap (LoadAndDisplayImageTask.javacember45) 02-19 15 at com.nostra13. universalimageloader.core.LoadAndDisplayImageTask.run (LoadAndDisplayImageTask.java:141) 02-19 15: 15: 10.008: 02-19 Error / ImageLoader (597): java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1076) 15: 15: 10.008: error / ImageLoader (597): 15: 10.008: error / ImageLoader (597): java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:569) in Java 02-19 15.
Add
<<< P> Example
android: largeHeap = "true"
within the application tag
in your manifest
Example
& lt; Application Android: allowBackup = "true" Android: largeHeap = "true" android: icon = "@ drawabl E / ic_launcher" & gt;
Comments
Post a Comment