默认情况下,UIL不支持方案(协议):间歇性地获取此异常

时间:2014-11-10 13:56:04

标签: android universal-image-loader

当我尝试使用从DB获取的Uri加载图像时,我继续收到此错误。如果我在代码中硬编码相同的Uri,它工作正常。你能帮忙吗?请找到以下代码。

I am using UIL version 1.9.3
These are my Configurations.

ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getBaseContext())
.threadPriority(Thread.NORM_PRIORITY - 2)
.denyCacheImageMultipleSizesInMemory()
.discCacheFileNameGenerator(new Md5FileNameGenerator())
.tasksProcessingOrder(QueueProcessingType.LIFO)
.writeDebugLogs() // Remove for release app
.build();
// Initialize ImageLoader with configuration.
imageLoader.getInstance().init(config);

    options = new DisplayImageOptions.Builder()
    .showImageOnLoading(R.drawable.ic_stub)
    .showImageForEmptyUri(R.drawable.ic_empty)
    .showImageOnFail(R.drawable.ic_error)
    .cacheInMemory(true)
    .cacheOnDisc(true)
    .considerExifParams(true)
    .displayer(new RoundedBitmapDisplayer(20))
    .build();
CODE : GETTING THE VALUE FROM DB.

List valueList =(List)valueMap.get(position);

String[] valuearray=valueList.toString().split(",");
holder.name.setText(valuearray[0]);
holder.shortdesc.setText(valuearray[1]);

String tempV =valuearray[2].substring(0, valuearray[2].length()-1);
//tried printing tempV and it is fine , I am doing a substring to remove the closing bracket,since I get the value from a list and split it in string array.
imageLoader.displayImage(tempV, holder.image, options, animateFirstListener);
Throws the error

CODE :HARDCODING THE VALUE

List valueList =(List)valueMap.get(position);

String[] valuearray=valueList.toString().split(",");
holder.name.setText(valuearray[0]);
holder.shortdesc.setText(valuearray[1]);

String tempV ="http://res.cloudinary.com/dabboosnz/image/upload/v1413384032/step1/img4.jpg";

        imageLoader.displayImage(tempV, holder.image, options, animateFirstListener);
This works fine. Any idea where am I going wrong? :)

0 个答案:

没有答案