[英]Invariant Violation: Picker has been removed from React Native. It can now be installed and imported from '@react-native-picker
How can i fix this problem in react native version 0.68.2我如何在 React Native 版本 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
You should use this package because the picker was removed from react native:您应该使用这个 package 因为选择器已从本机反应中删除:
https://github.com/react-native-picker/picker https://github.com/react-native-picker/picker
Install it using安装它使用
npm install @react-native-picker/picker --save
OR或者
yarn add @react-native-picker/picker
You can then import the Picker Element like this:然后您可以像这样导入 Picker 元素:
import {Picker} from '@react-native-picker/picker';
Just try installing @react-native-picker/picker instead of just "Picker"只需尝试安装 @react-native-picker/picker 而不仅仅是“Picker”
try this command: npm install @react-native-picker/picker --save试试这个命令:npm install @react-native-picker/picker --save
You can read more about it here - https://github.com/react-native-picker/picker您可以在这里阅读更多相关信息 - https://github.com/react-native-picker/picker
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.