我正在尝试将react-native-device-info从中删除(以支持较小的react-native-version-number)。
我已经采取了以下步骤:
删除react-native-device-info
g 213)中响应-本机-设备-信息
然而,当我运行这个应用程序时,我仍然会看到这些错误。我遗漏了什么?
[Thu Jul 23 2020 14:20:30.622] ERROR Error: @react-native-community/react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:
• For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.
• Rebuild and re-run the app.
• If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-device-info
[Thu Jul 23 2020 14:20:30.623] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
[Thu Jul 23 2020 14:20:31.746] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

发布于 2020-09-21 16:24:05
在react本机的当前版本中,只需从package.json中移除依赖项并运行pod install即可。不需要手动断开连接。
我们还在package.json中添加了一个纱线后安装脚本,以便始终运行postinstall:
"postinstall": "(cd ios && pod install)",
发布于 2020-07-23 20:41:18
react-native unlink react-native-device-info
您还需要从代码库中删除react-native-device-info,可能还会在某个文件中导入它。另外,当移除豆荚时,请记住重新安装应用程序并重新启动绑定程序。
https://stackoverflow.com/questions/63061724
复制相似问题