d = Drawable.createFromPath(Environment.getExternalStorageDirectory().toString()+"/"+filenameString);
System.err.println(Environment.getExternalStorageDirectory().toString()+"/"+filenameString+" - "+d);
image.setImageDrawable(d);
以上是我用于获取drawable
且低于Logcat
的代码:
04-09 15:34:44.005: I/System.out(20814): Not a DRM File, opening notmally
04-09 15:34:44.010: I/System.out(20814): buffer returned
04-09 15:34:44.010: D/skia(20814): --- SkImageDecoder::Factory returned null
04-09 15:34:44.010: W/System.err(20814): /storage/sdcard0/1396850896.482724.png
04-09 15:34:44.010: W/System.err(20814): - null
我检查过,文件存在。
我设置了 WRITE_EXTERNAL_STORAGE
和 READ_EXTERNAL_STORAGE
。