在 react native 中安装 reanimated 2 后无法构建应用程序
Unable to build app after reanimated 2 installation in react native
我只是 运行 在尝试为 ios 构建 react native 时遇到 reanimated 2 (2.7.0) 的问题,出现以下错误:
ERROR TypeError: Cannot add new property '__reanimatedHostObjectRef'
This error is located at:
in AnimatedComponent(View) (at createAnimatedComponent.tsx:693)
in Unknown
in StyledNativeComponent (created by Styled(Component))
in Styled(Component) (at sheet.tsx:13)
in PanGestureHandler (at sheet.tsx:12)
in SheetContainer (at staff.tsx:59)
in StaffSheet (at App.tsx:45)
in RCTView (at View.js:32)
in View (at App.tsx:40)
in ApolloProvider (at App.tsx:39)
in App (at renderApplication.js:48)
in RCTView (at View.js:32)
in View (at AppContainer.js:106)
in RCTView (at View.js:32)
in View (at AppContainer.js:133)
in AppContainer (at renderApplication.js:41)
in mobile(RootComponent) (at renderApplication.js:57), js engine: hermes
知道如何解决这个问题吗?
相关问题在这里:
https://github.com/software-mansion/react-native-reanimated/issues/1517
您是否尝试使用线程中提到的 JSON.parse(JSON.stringify(items)) 深度复制对象的 object/array?
我只是 运行 在尝试为 ios 构建 react native 时遇到 reanimated 2 (2.7.0) 的问题,出现以下错误:
ERROR TypeError: Cannot add new property '__reanimatedHostObjectRef'
This error is located at:
in AnimatedComponent(View) (at createAnimatedComponent.tsx:693)
in Unknown
in StyledNativeComponent (created by Styled(Component))
in Styled(Component) (at sheet.tsx:13)
in PanGestureHandler (at sheet.tsx:12)
in SheetContainer (at staff.tsx:59)
in StaffSheet (at App.tsx:45)
in RCTView (at View.js:32)
in View (at App.tsx:40)
in ApolloProvider (at App.tsx:39)
in App (at renderApplication.js:48)
in RCTView (at View.js:32)
in View (at AppContainer.js:106)
in RCTView (at View.js:32)
in View (at AppContainer.js:133)
in AppContainer (at renderApplication.js:41)
in mobile(RootComponent) (at renderApplication.js:57), js engine: hermes
知道如何解决这个问题吗?
相关问题在这里: https://github.com/software-mansion/react-native-reanimated/issues/1517
您是否尝试使用线程中提到的 JSON.parse(JSON.stringify(items)) 深度复制对象的 object/array?