React native 世博会应用发布后SVG图像消失

React native 世博会应用发布后SVG图像消失,react-native,svg,expo,React Native,Svg,Expo,我正在使用“react native remote svg”在我的react native expo应用程序中显示svg图像。在我在Expo中发布应用程序之前,所有东西都会在模拟器/设备上显示得很好,此时所有SVG图像都会消失 示例代码: import Image from 'react-native-remote-svg'; <Image style={styling.imageStyle} source={require('../res/images/sampleImage

我正在使用“react native remote svg”在我的react native expo应用程序中显示svg图像。在我在Expo中发布应用程序之前,所有东西都会在模拟器/设备上显示得很好,此时所有SVG图像都会消失

示例代码:

import Image from 'react-native-remote-svg';
<Image
   style={styling.imageStyle}
   source={require('../res/images/sampleImage.svg')} />
从“react native remote svg”导入图像;

您必须预加载它们,以便它们在生产版本中可用

_loadResourcesAsync = async () => {
  return Promise.all([
    Asset.loadAsync([
      require('./assets/svg/some.svg')
    ]),
    Font.loadAsync({
      // This is the font that we are using for our tab bar
      ...Ionicons.font,
      // We include SpaceMono because we use it in HomeScreen.js. Feel free
      // to remove this if you are not using it in your app
      'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
    }),
  ]);
};

在expo项目的App.js文件中。

发现expo不支持SVG。工作得很有魅力。非常感谢。