react-native - 错误:[@RNC/AsyncStorage]:NativeModule:AsyncStorage 为空
问题描述
错误:[@RNC/AsyncStorage]:NativeModule:AsyncStorage 为空。
要解决此问题,请尝试以下步骤:
•react-native link @react-native-community/async-storage
在项目根目录中运行。
• 重建并重新启动应用程序。
--reset-cache
• 使用标志运行打包程序。
• 如果您在iOS 上使用CocoaPods,请pod install
在ios
目录中运行,然后重新构建并重新运行应用程序。
• 如果在使用 Jest 进行测试时发生这种情况,请查看如何将 AsyncStorage 与其集成的文档:https ://react-native-community.github.io/async-storage/docs/advanced/jest
如果这些都不能解决问题,请在 Github 存储库上打开一个问题:https ://github.com/react-native-community/react-native-async-storage/issues
解决方案
推荐阅读
- sql-server - 查找链接到我的 SQL Server 的数据库
- python - 如何离线重新创建所有已安装软件包的 python 虚拟环境?
- python - 检查文件夹中是否有不同名称的文件
- ios - 如何使用 Swift 4.2 减少 Image Base64 数据字符串的长度?
- python - 具有多索引的 Pandas 行聚合
- html - 无法摆脱内联块引用中的文本缩进
- python - python单击设置选项的允许值
- sql - Oracle SQL 为一组分组结果中的每个组获取具有 MAX 值的行
- assembly - 我的汇编 x86-64 代码做错了什么?
- python - 根据另一个数据框仅更改数据框中整个列的一小部分值