关于拍照App开发报错

来源:6-16 拍照APP开发-图片获取与图片展示【实战尝鲜】

慕函数2082699

2021-08-08

选择图片后,显示会报错
图片描述
然后,报错如下:
======== Exception caught by image resource service ================================================
The following FileSystemException was thrown resolving an image codec:
Cannot open file, path = ‘/storage/emulated/0/DCIM/Camera/IMG_20210808_033019.jpg’ (OS Error: Permission denied, errno = 13)

When the exception was thrown, this was the stack:
#0 _File.open. (dart:io/file_impl.dart:356:9)

#3 FileImage._loadAsync (package:flutter/src/painting/image_provider.dart:884:29)

(elided 2 frames from dart:async)
Path: /storage/emulated/0/DCIM/Camera/IMG_20210808_033019.jpg

请问,是因为模拟器的配置问题吗?

写回答

1回答

CrazyCodeBoy

2021-08-09

给你的Android项目配置下存储权限。

0
0

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3270 问题

查看课程