Java 实现ImageSwitcher功能| FileNotFoundException

Java 实现ImageSwitcher功能| FileNotFoundException,java,universal-image-loader,Java,Universal Image Loader,我正在尝试使用Android Universal Image Loader实现ImageSwitcher功能, 下面是代码 public View getView(int position, View convertView, ViewGroup parent) { ImageView i = new ImageView(mContext); Uri uri = Uri.parse(imageUrls[position]);

我正在尝试使用Android Universal Image Loader实现ImageSwitcher功能, 下面是代码

public View getView(int position, View convertView, ViewGroup parent) {
            ImageView i = new ImageView(mContext);
            Uri uri = Uri.parse(imageUrls[position]);

            System.out.println("URI=" + uri);
         InputStream inputStream;
        try {
            **inputStream = getContentResolver().openInputStream(uri);**
            Bitmap bm= BitmapFactory.decodeStream(inputStream);

            i.setImageBitmap(bm);
            i.setAdjustViewBounds(true);
但是,我在以下位置获得FileNotFoundException:

但是当我尝试直接从web浏览器访问URI时,我看到了图像。图像URI的设置方式如下:

public static final String[] IMAGES = new String[] {

    "http://image.donga.com/mlbpark/fileUpload/201401/52dde15113c53b01da3b.jpg",
    "https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/AAAAAAAAAbs/rWlj1RUKrYI/s1024/A%252520Photographer.jpg",
    etc...
知道我哪里出错了吗

public static final String[] IMAGES = new String[] {

    "http://image.donga.com/mlbpark/fileUpload/201401/52dde15113c53b01da3b.jpg",
    "https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/AAAAAAAAAbs/rWlj1RUKrYI/s1024/A%252520Photographer.jpg",
    etc...