gpt4 book ai didi

FileSystemException (FileSystemException: Cannot create file, path = './skipwelcomedata_bad_keys.hive' (OS Error: Read-only file system, errno = 30))(文件系统异常(文件系统异常:无法创建文件,路径=‘./skipparedata_ad_keys.hive’(操作系统错误:只读文件系统,errno=30)))

转载 作者:bug小助手 更新时间:2023-10-25 13:39:55 25 4
gpt4 key购买 nike



I have set up a data storage system with Hive in my Flutter application. After installing everything, I get this error:

我已经在我的颤动应用程序中设置了一个带有蜂窝的数据存储系统。安装完所有内容后,我收到以下错误:


FileSystemException (FileSystemException: Cannot create file, path = './skipwelcomedata_bad_keys.hive' (OS Error: Read-only file system, errno = 30))

What is this error? How can I solve it? Thanks for helps.

这是什么错误?我怎么才能解决它呢?谢谢你的帮助。


更多回答
优秀答案推荐

  final directory = await getApplicationDocumentsDirectory();
print("${directory.path}/db");
// Hive.init(directory.path);
collection ??= await BoxCollection.open(
'AppName', // Name of your database
{'images'}, // Names of your boxes
path: "${directory.path}/db", // <-- this fixes it
);

I noticed a bug, if you just put the documents directory it doesn't work because it won't add a slash to the end of the path. So you have to add something like /db after the slash. I don't if I was having a weird problem, but seemed to be the issue.

我注意到一个错误,如果你只是把文档目录放进去,它不会起作用,因为它不会在路径的末尾添加斜杠。因此,您必须在斜杠后面添加类似/db的内容。我不知道我是否有一个奇怪的问题,但似乎是问题所在。


更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com