图像已发生,但未出现在本机反应中

时间:2019-03-08 12:27:17

标签: reactjs react-native react-image

当我尝试将图像添加到我的第一个React本机应用程序中时,即使它发生了也没有出现。

我确实喜欢文档中所述的内容,但问题仍然存在

这是我的代码:

<Image source={{uri:'https://facebook.github.io/react/img/logo_og.png'}}
  resizeMode="stretch" style={{
    alignSelf: 'center',
    height: 150,
    width: 150,
    borderWidth: 1,
    borderRadius: 75
  }}/>

我使用了本地图像的require,也一样:

<Image source={require('./images/item7.jpg')}
  resizeMode="stretch" style={{
    alignSelf: 'center',
    height: 150,
    width: 150,
    borderWidth: 1,
    borderRadius: 75
  }}/>

0 个答案:

没有答案