Android SkImageDecoder :: Factory返回null

时间:2013-02-22 03:25:47

标签: android bitmap

我从服务器下载图像并将其保存在SD卡中。

当我尝试使用我的代码获取相同内容时,会出现错误SkImageDecoder:: Factory returned null

请帮帮我......

我读取文件的代码如下:

try{
    extStorageDirectory = Environment.getExternalStorageState().toString(); 
    extStorageDirectory = Environment.getExternalStorageDirectory().toString();     
    extStorageDirectory = extStorageDirectory + "/egnuri/456.png";  
    // egnuri is directory name. and 456.png is imagename.

    Bitmap loadimage = BitmapFactory.decodeFile(extStorageDirectory);
    imView.setImageBitmap(loadimage);
}catch(Exception e){
    e.printStackTrace();
}

0 个答案:

没有答案