У меня возникла проблема при удалении файлов из каталога загрузок на Android 12 или более поздней версии.
Может ли кто-нибудь помочь мне решить эту проблему?
Код
bool statusFileExists = await status.exists();
if (!statusFileExists) {
debugPrint("File does not exist at path: $statusPath");
return true;
}
debugPrint("file exists: $statusFileExists");
debugPrint(" file exists on '$statusPath'");
debugPrint("stat: ${await status.stat()}");
if (await Permission.storage.request().isGranted) {
await status.delete(recursive: true); // this line is throwing exception
}
У меня возникла проблема при удалении файлов из каталога загрузок на Android 12 или более поздней версии. Может ли кто-нибудь помочь мне решить эту проблему? Код [code]bool statusFileExists = await status.exists(); if (!statusFileExists) { debugPrint("File does not exist at path: $statusPath"); return true; }
debugPrint("file exists: $statusFileExists"); debugPrint(" file exists on '$statusPath'"); debugPrint("stat: ${await status.stat()}"); if (await Permission.storage.request().isGranted) { await status.delete(recursive: true); // this line is throwing exception } [/code] Исключение [code]Exception has occurred. PathNotFoundException (PathNotFoundException: Deletion failed, path = '/storage/emulated/0/Download/Saved Statuses/IMG_20240630_100000.jpg' (OS Error: No such file or directory, errno = 2)) [/code] Файл AndroidManifest.xml [code]manifest xmlns:android="http://schemas.android.com/apk/res/android">
Я столкнулся с проблемой при удалении файла из каталога загрузки на Android 12 или более поздней версии
может ли кто-нибудь помочь мне решить эту проблему?
Здесь я прикрепил снимок экрана с кодом, и он выводится с выданным исключением.Код с...
У меня возникла проблема при удалении файлов из каталога загрузок на Android 12 или более поздней версии.
Может ли кто-нибудь помочь мне решить эту проблему?
Код
bool statusFileExists = await status.exists();
if (!statusFileExists) {
debugPrint(...
Я столкнулся с ошибкой, связанной с установкой и версией Python. когда я набираю python --version, он всегда отображается ниже ошибки.
нет pyhton в C:\users\users\appdata\local\programs\python\python310\python.exeНезависимо от того, установлен ли...
Я столкнулся с ошибкой, связанной с установкой и версией Python. когда я набираю python --version, он всегда показывает ошибку ниже.
нет Python в C:\users\users\appdata\local\programs\python\python310\python.exe
Это сообщение всегда отображается,...