我正在尝试从 sdcard 获取图像以将其显示在 android 的 imageview 中。它显示错误为 SkImageDecoder:factory 在 android emulator2.2 中返回 null。这是我在 android 中从 SDcard 检索图像到 imageview 的代码。
File imgFile = new File("/sdcard/wm.png");
if (imgFile.exists()) {
Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
ImageView myImage = (ImageView) findViewById(R.id.imageView1);
myImage.setImageBitmap(myBitmap);
}
请解决此问题。