如何使用flutter从应用程序导出文件中的csv?不使用简单的权限插件和Permission_handler插件

时间:2019-07-19 06:04:05

标签: flutter

我想导出.csv文件以从应用程序下载文件夹。我的应用正在使用Flutter开发。我尝试使用简单的权限和权限处理程序插件,但都与其他插件有问题/冲突...所以我可以不使用这两个插件就导出吗?

参考:

https://www.woolha.com/tutorials/flutter-reading-and-writing-files-example
https://icircuit.net/create-csv-file-flutter-app/2614
https://flutter.dev/docs/cookbook/persistence/reading-writing-files
https://stackoverflow.com/questions/56074889/how-do-i-fix-this-error-of-simple-permissions-on-flutter
https://stackoverflow.com/questions/50561737/getting-permission-to-the-external-storage-file-provider-plugin

点击导出按钮时出现错误:

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: FileSystemException: Cannot open file, path = '/storage/emulated/0/Download/export.csv' (OS Error: Permission denied, errno = 13)

当我尝试使用简单权限插件时出错: 与以下错误相同:How do i fix this error of 'simple_permissions' on flutter? 但是指南中的步骤说需要卸载并重新安装android studio ...我还有其他选择吗?

*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See  for more information on the problem and how to fix it.
*******************************************************************************************

0 个答案:

没有答案