react-native-svg 和 android 似乎存在问题。此错误仅在我的Android应用程序中引发 - iOS 应用程序似乎没问题?错误消息没有告诉我错误可能发生在哪里。任何想法都会有所帮助...
代码:
import { Circle } from 'react-native-svg';
<Circle
cx="0"
cy="0"
r={size / 2 - 6}
fill="rgba(255,255,255,0.7)" // Transparency
/>
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"react-native-svg": "9.5.3",
"react-native-svg-charts": "^5.3.0",
更新:
我认为已经找到了错误的根源。里面node_modules>react-native-svg>elements>Path.js>Path>render
有一个道具“d”的要求——上面写着:
<RNSVGPath
ref={this.refMethod}
{...extractProps(propsAndStyles(props), this)}
d={props.d}
/>