未找到URI catch文件的imageview

时间:2017-01-13 06:28:30

标签: android imageview uri firebase-storage

imageView = (ImageView) v.findViewById(R.id.lbl2);
            try {
                Bitmap bitmap= BitmapFactory.decodeStream(getContentResolver().openInputStream(Uri.parse(c.getPhotoUrl())));
                imageView.setImageBitmap(bitmap);
            } catch (FileNotFoundException e) {
                // handle errors
                Toast.makeText(Chat.this, "File not found", Toast.LENGTH_SHORT).show();
            } catch (IOException e) {
                // handle errors
                Toast.makeText(Chat.this, "Error : "+e, Toast.LENGTH_SHORT).show();
            }

URI是jpeg文件我尝试将其解码为位图 并且它一直没有找到文件

0 个答案:

没有答案