react-native - react-native expo 问题:`SceneView` 的检查方法
问题描述
我不明白为什么我的代码不能运行其他设备,而我的代码在我的旧设备中检查正常。这是通知:
Invariant Violation: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `SceneView`.
This error is located at:
in SceneView (created by StackViewLayout)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent (created by Card)
in Card (created by Container)
in Container (created by StackViewLayout)
in RCTView (created by View)
in View (created by StackViewLayout)
in RCTView (created by View)
in View (created by StackViewLayout)
in StackViewLayout (created by withOrientation)
in withOrientation (created by Transitioner)
in RCTView (created by View)
in View (created by Transitioner)
in Transitioner (created by StackView)
in StackView (created by Navigator)
in Navigator (created by KeyboardAwareNavigator)
in KeyboardAwareNavigator (created by NavigationContainer)
in NavigationContainer (created by App)
in RCTView (created by View)
in View (created by App)
in App (created by ExpoRootComponent)
in RootErrorBoundary (created by ExpoRootComponent)
in ExpoRootComponent
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
This error is located at:
in NavigationContainer (created by App)
in RCTView (created by View)
in View (created by App)
in App (created by ExpoRootComponent)
in RootErrorBoundary (created by ExpoRootComponent)
in ExpoRootComponent
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
在我的代码 app.js 中。Screens and View 方法没问题。那么我必须做什么?
解决方案
不确定我的问题,但是当我以错误的方式导入模块时出现类似的错误,以下是错误的:
从'/modules/my-module.js'导入{myDefault};
现在是正确的:
从'/modules/my-module.js'导入myDefault;
推荐阅读
- javascript - 如何通过第一个数字出现将字符串分成两部分?
- algorithm - 图算法:将大型有向图划分为组/簇并最小化组的数量
- r-markdown - Rmarkdown 输出似乎没有为绘图而被压制,但被其他命令压制
- wordpress-gutenberg - 如何:为 Wordpress Gutenberg 的保存功能提供带有 innerBlocks 的组件?
- android - 将硬件键模式映射到操作
- angular - NgRx 效果导致无限 http 循环
- javascript - 如何使用 APCA(高级永久对比度算法)找到颜色对比度?
- python - 如果列值为空,则将列移动一步
- javascript - 使用 URL 参数填充下拉列表的第一个选项
- javascript - 在选择字段上设置选项样式 - 悬停