android - react-native-picker 不适用于 react-native 版本 0.63.2
问题描述
我将 react-native 版本升级到0.63.2
. 然后我在Android应用程序上遇到问题。
Android 应用显示空白屏幕。
错误如下:
Warning: Picker has been extracted from react-native core and will be removed in a future release.
It can now be installed and imported from '@react-native-community/picker' instead of 'react-native'.
See https://github.com/react-native-community/react-native-picker
ERROR TypeError: Super expression must either be null or a function
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
我怎么解决这个问题?
解决方案
选择器已从“react-native”安装库@react-native-picker/picker中删除
代替
import {Picker} from 'react-native';
至
import {Picker} from '@react-native-picker/picker';
推荐阅读
- powershell - Invoke-Command Powershell - 错误:无法处理参数,因为参数“路径”的值为 null 并且管道中字符后的表达式
- flutter - 如何:让按钮每 X 秒抖动一次?
- security - 在数据库中存储银行帐号和排序代码
- elasticsearch - 如何按字段内容在 Fluentd 中路由
- mysql - Rails 不断要求为 MySQL 存储提供 AWS 凭证
- parsing - Cmd 行 bcdedit 解析标识符
- html - 故意在元素 CSS HTML上方添加可填充空间
- flutter - Flutter:如何使用动态传递的对象制作通用方法
- cocos2d-x - 如何更改 lambda 表达式中的字符串变量?
- android - 无法在 react-native 中安装应用程序