BitmapFactory.decodeFile 返回null

2016-10-10  本文已影响732人  尔乐

BitmapFactory.Options options =newBitmapFactory.Options();

options.inJustDecodeBounds=true;

img= BitmapFactory.decodeFile(fileSrc,options);

首先查看路径是否正确,如果没有问题,请检查是否获得权限READ_EXTERNAL_STORAGE

未获得权限,回报错filenotfound,找不到文件。

上一篇 下一篇

猜你喜欢

热点阅读