gpt4 book ai didi

react-native 博览会问题 : check method of `SceneView`

转载 作者:行者123 更新时间:2023-12-04 08:54:00 24 4
gpt4 key购买 nike

我不明白为什么我的代码不能运行其他设备,而我的代码在我的旧设备中检查正常。这是通知:

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 方法没问题。那么我必须做什么?

最佳答案

不确定我的问题,但是当我以错误的方式导入模块时出现类似的错误,以下是错误的:

import {myDefault} from '/modules/my-module.js';



现在是正确的:

import myDefault from '/modules/my-module.js';

关于react-native 博览会问题 : check method of `SceneView` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51113127/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com