UIL不支持方案(协议)默认情况下,你应该实现这种支持自己 [英] UIL doesn't support scheme(protocol) by default You should implement this support yourself

查看:643
本文介绍了UIL不支持方案(协议)默认情况下,你应该实现这种支持自己的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我从摄像头捕获的图像,并通过每一次我得到像

Hello I am capturing image from camera and save it into SDCARD and loading via Universal Image Loader but every time i get an error like

       09-20 14:38:22.617: E/ImageLoader(16626): 
      UIL doesn't support scheme(protocol) by default [/mnt/sdcard/temp_photobooth.png]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))



     imgLoader.displayImage(Environment
                        .getExternalStorageDirectory().toString()
                        + File.separator + Const.TEMP_FILE, choosen_image);

任何人可以帮助我什么,我应该做的呢?

can anybody help me what should i have to do for it?

推荐答案

如果你从SD卡加载图像,你应该preFIX路径与文件:///

If you are loading image from SDCARD you should prefix the path with file:///.

String imageUri = "http://example.com/image.png"; // from Web
String imageUri = "file:///mnt/sdcard/image.png"; // from SD card
String imageUri = "content://media/external/audio/albumart/13"; // from content provider
String imageUri = "assets://image.png"; // from assets
String imageUri = "drawable://" + R.drawable.image; // from drawables (only images, non-9patch)

所以,你必须这样写:

So you have to write like this:

imgLoader.displayImage("file:///"+Environment
    .getExternalStorageDirectory().toString() + File.separator + Const.TEMP_FILE, choosen_image);

这篇关于UIL不支持方案(协议)默认情况下,你应该实现这种支持自己的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆