我对标题中提到的错误感到头疼。\n我正在使用react-native-gifted-charts(https://www.npmjs.com/package/react-native-gifted-charts/v/1.0.3)\n图表在 ios 中完美运行,但在 Android 中它不断崩溃并抛出“Invariant Violation: requireNativeComponent: 在 UIManager 中找不到“RNSVGSvgViewAndroid”。”\n首先我认为这是我的代码的问题,因为它之前适用于 Android ,但即使我反转代码,错误仍然存在。\n我正在使用yarn作为包管理器和Expo托管工作流程。\n依赖项如下。
\n"react-native": "0.70.5",\n"react-native-gifted-charts": "^1.2.42",\n"react-native-linear-gradient": "2.6.2",\n"react-native-svg": "12.1.0",\n\nRun Code Online (Sandbox Code Playgroud)\n\xe2\x96\xa0我尝试过的事情
\nimport React, { useState } from "react";\nimport { View, StyleSheet, Text, TouchableOpacity, ScrollView } from "react-native";\nimport type { NativeStackScreenProps } from "@react-navigation/native-stack";\nimport { MainStackParamList } from "../types/navigation";\nimport dayjs from "dayjs";\nimport { BarChart, LineChart, PieChart } from "react-native-gifted-charts";\nimport …Run Code Online (Sandbox Code Playgroud)