-1

我们正在做 React Native 应用程序。它在 iOS 和 Android 上都运行良好。但是,启动应用程序后,如果我们打开控制中心,应用程序就会崩溃。

控制台数据如下

Error: {
    message = "Entries must be arrays of the form [key: string, value: string], got: (\n    InActiveTime\n)";
}

有什么建议吗?

4

1 回答 1

0

最后,我找到了问题所在。

问题是我们在 Asyncstorage 中存储了一些键值,我们在那里存储了日期。该日期数据类型无法存储在 Asyncstorage 中。因此,据我了解,我们可以仅存储 Asyncstorage字符串类型。

希望这对将来的人有所帮助。

AsyncStorage.setItem(time, new Date().toString());
于 2019-09-25T08:33:28.460 回答