我正在运行这个程序来显示 SVG 图像
import React, { Component } from 'react';
import { View } from 'react-native';
import Expo from './assets/check-mark.svg';
import SVG from 'react-native-svg';
export default class MyApp extends Component {
render(){
return (
<View style={{backgroundColor:"black"}}>
<Expo width={20}
height={15} />
</View>
);
}
}
Run Code Online (Sandbox Code Playgroud)
并遇到了这个错误Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: number.
我该如何解决这个问题?或者还有其他更好的方法来使用 React Native 的 SVG 图像吗?