【问题标题】:React Native macOS Component ExceptionReact Native macOS 组件异常
【发布时间】:2021-07-24 13:35:33
【问题描述】:

我是 React Native 的新手,我正在尝试在 macOS 上使用 react-native-chart-kit 构建一个简单的图表世界。

我不断收到这些组件异常错误,经过多次谷歌搜索后我无法弄清楚如何解决。

我们将不胜感激。

mytestreactapp@0.0.1 /Users/xkenneth/Work/myTestReactApp
├─┬ react-native-chart-kit@6.11.0
│ └── react-native-svg@12.1.1
└─┬ react-native-svg-transformer@0.14.3
  └── react-native-svg@12.1.1 deduped
[Sat Jul 24 2021 08:29:30.511]  ERROR    Invariant Violation: requireNativeComponent: "RNSVGGroup" was not found in the UIManager.

This error is located at:
    in RNSVGGroup (at G.tsx:33)
    in G (at LineChart.js:420)
    in RNSVGGroup (at G.tsx:33)
    in G (at LineChart.js:376)
    in RNSVGGroup (at G.tsx:33)
    in G (at Svg.tsx:202)
    in RNSVGSvgView (at Svg.tsx:197)
    in Svg (at LineChart.js:372)
    in RCTView (at View.js:44)
    in View (at LineChart.js:371)
    in LineChart (at App.js:73)
    in RCTView (at View.js:44)
    in View (at App.js:71)
    in RCTView (at View.js:44)
    in View (at App.js:57)
    in RCTScrollContentView (at ScrollView.js:1224)
    in RCTScrollView (at ScrollView.js:1369)
    in ScrollView (at ScrollView.js:1395)
    in ScrollView (at App.js:48)
    in RCTView (at View.js:44)
    in View (at SafeAreaView.js:42)
    in ForwardRef(SafeAreaView) (at App.js:47)
    in App (at renderApplication.js:45)
    in RCTView (at View.js:44)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:44)
    in View (at AppContainer.js:132)
    in AppContainer (at renderApplication.js:39)

【问题讨论】:

标签: macos react-native react-native-chart-kit


【解决方案1】:

好的,我想通了。我指定的 macOS 版本太低。

我不得不在我的 Podfile 中将它从 10.13 更改为 10.14,然后执行“pod install”并解决了!

【讨论】:

猜你喜欢
  • 2021-07-02
  • 2021-04-22
  • 2021-03-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-08
  • 2019-10-30
  • 2017-02-15
相关资源
最近更新 更多