Frage

When I changed the focus of a ListView about 10 times, then current activity would crash. This condition happened repeatedly. And the log said below:

02-10 17:43:57.260: E/Trace(23192): error opening trace file: No such file or directory (2) 02-10 17:43:57.560: W/ImageLoader(23192): discCache(), discCacheSize() and discCacheFileCount calls overlap each other

And my configuration is:

ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
getApplicationContext())
// .taskExecutor(AsyncTask.THREAD_POOL_EXECUTOR)
// .taskExecutorForCachedImages(AsyncTask.THREAD_POOL_EXECUTOR)
.threadPoolSize(5).threadPriority(Thread.NORM_PRIORITY - 2)
.denyCacheImageMultipleSizesInMemory()
// .memoryCache(new WeakMemoryCache())
.memoryCacheSize(2 * 1024 * 1024)
// .discCache(new UnlimitedDiscCache(cacheDir))
.discCacheSize(10 * 1024 * 1024)
.discCacheFileCount(50)
.enableLogging().build();

Could you tell me why? And How could I correct it?

War es hilfreich?

Lösung 2

In the codes of Android-universal-Image-Loader,discCache(), discCacheSize() and discCacheFileCount() have the same function on the execution of the library, You only can call one of them, but two or all of them, or, exceptions will be thrown.

Andere Tipps

I was told somewhere that methods, discCacheSize() and discCacheFileCount(), couldn't be called simultaneously. The link is here: https://github.com/nostra13/Android-Universal-Image-Loader/issues/532 I hope this will help you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top