File 使用Flatter安装时,无法在Android/data中查看应用程序文件夹

File 使用Flatter安装时,无法在Android/data中查看应用程序文件夹,file,flutter,android-emulator,File,Flutter,Android Emulator,D/EGL_仿真(14006):eglMakeCurrent:0xeaff6780:ver 3 1(tinfo 0xc942c8e0) I/flatter(14006):创建目录“/data/user/0/quadauq.ffmpeg\u examplebynena/app\u flatter/CapturedImages” D/EGL_仿真(14006):eglMakeCurrent:0xeafc6d40:ver 3 1(tinfo 0xdf9af9b0) 显示为成功,但我在Andrid/da

D/EGL_仿真(14006):eglMakeCurrent:0xeaff6780:ver 3 1(tinfo 0xc942c8e0) I/flatter(14006):创建目录“/data/user/0/quadauq.ffmpeg\u examplebynena/app\u flatter/CapturedImages” D/EGL_仿真(14006):eglMakeCurrent:0xeafc6d40:ver 3 1(tinfo 0xdf9af9b0)


显示为成功,但我在Andrid/data中的任何位置都看不到应用程序文件夹或创建的文件夹-有人能帮忙吗?

您可以请求存储目录:

Future get _localPath async {
final Directory directory = await getApplicationDocumentsDirectory();
return directory.path;
}

Future _createDirectory() async {
final String path = await _localPath;
final Directory directory = await Directory('$path/CapturedImages').create(recursive: true);
print("The directory $directory is created");
}
而不是应用程序文档目录


因此,您可以在Android/data/quadauq.ffmpeg\u示例byneena/files/CapturedImages中看到创建的应用程序文件夹。您可以请求存储目录:

Future get _localPath async {
final Directory directory = await getApplicationDocumentsDirectory();
return directory.path;
}

Future _createDirectory() async {
final String path = await _localPath;
final Directory directory = await Directory('$path/CapturedImages').create(recursive: true);
print("The directory $directory is created");
}
而不是应用程序文档目录


因此,您可以在Android/data/quadauq.ffmpeg\u examplebynena/files/CapturedImages中看到创建的应用程序文件夹。对不起,我是说在模拟器中,我无法在Android/data中看到软件包文件夹,即使在安卓设备上安装后,手动查看时也看不到应用程序目录。当分析软件包时,它看起来应该是
/data/app/
,但仍然没有找到itOk,看起来Flatter应用程序没有在内部存储中创建自己的特定于应用程序的文件夹,如果您想要,您必须使用path\u provider软件包抱歉,我是说在emulator中,我无法在Android/Database中看到软件包文件夹,即使在Android设备上安装后,手动查看时也看不到应用程序目录。当分析软件包时,它看起来应该是
/data/app/
,但仍然找不到它。如果您想使用path\u provider软件包,flifter应用程序似乎不会在内部存储中创建自己的特定于应用程序的文件夹