如何在react原生版本0.68.2中修复此问题
Invariant Violation: Picker has been removed from React Native. It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. See https://github.com/react-native-picker/picker
如何在react原生版本0.68.2中修复此问题
Invariant Violation: Picker has been removed from React Native. It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. See https://github.com/react-native-picker/picker
2条答案
按热度按时间ht4b089n1#
您应该使用此包,因为选择器已从react native中删除:
https://github.com/react-native-picker/picker
安装时使用
或
然后,您可以按如下方式导入选取器元素:
4xrmg8kj2#
只需尝试安装@react-native-picker/picker,而不仅仅是“Picker”
请尝试以下命令:npm安装@React-本机-选取器/选取器--保存
您可以在此处阅读更多信息-https://github.com/react-native-picker/picker