美文网首页
BitmapFactory.decodeFile 返回null

BitmapFactory.decodeFile 返回null

作者: 尔乐 | 来源:发表于2016-10-10 11:06 被阅读732次

BitmapFactory.Options options =newBitmapFactory.Options();

options.inJustDecodeBounds=true;

img= BitmapFactory.decodeFile(fileSrc,options);

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

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

相关文章

网友评论

      本文标题: BitmapFactory.decodeFile 返回null

      本文链接:https://www.haomeiwen.com/subject/bigmyttx.html