我在更新 Expo 和 Expo-Cli 后收到此错误:
Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.
To fix this issue try these steps:
• Run `react-native link @react-native-community/async-storage` in the project root.
• Rebuild and restart the app.
• Run the packager with `--reset-cache` flag.
• If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app.
• If this happens while testing with Jest, check out docs how to integrate AsyncStorage with it: https://react-native-community.github.io/async-storage/docs/advanced/jest
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-async-storage/issues
当我了解到 AsyncStorage 从 react-native-community 贬值时,它就开始了,所以我安装@react-native-async-storage/async-storage
并手动更改了所有导入语句,但它仍然无法正常工作。
另外我不确定如何Run
反应原生链接@react-native-community/async-storage in the project root.