Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
重新启动后未在iOS模拟器上打开本地文件_Ios_File_Flutter - Fatal编程技术网

重新启动后未在iOS模拟器上打开本地文件

重新启动后未在iOS模拟器上打开本地文件,ios,file,flutter,Ios,File,Flutter,我试图读写本地文件在颤振,直到那时一切都是好的 但当我重新启动模拟器时,我得到了错误: ════════ Exception caught by image resource service ════════════════════════════ Cannot open file, path = '/Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/

我试图读写本地文件在颤振,直到那时一切都是好的

但当我重新启动模拟器时,我得到了错误:


════════ Exception caught by image resource service ════════════════════════════
Cannot open file, path = '/Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/8A33D1B7-4647-4255-A759-65835BE2DBE6/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-17T23:57:11.239738Z.png' (OS Error: No such file or directory, errno = 2)
════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by image resource service ════════════════════════════
Cannot open file, path = '' (OS Error: Bad address, errno = 14)
════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: FileSystemException: Cannot open file, path = '' (OS Error: Bad address, errno = 14)
奇怪的是,我有一个文件,其中保存了图像的所有路径,可以读取它

我只是用DateTime.now()名称保存了一些图像,当我使用Directory(path).list()时,我会将它们保存在那里:

flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/local_mask_files
flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-15T06:35:21.536337Z.png
flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-15T06:37:47.983926Z.png
flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-17T23:57:11.239738Z.png

这是一个bug吗?

正在清除缓存?林克:不是这个。。问题是Image.file()无法识别该文件。