Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未显示react本机android url图像_Android_React Native - Fatal编程技术网

未显示react本机android url图像

未显示react本机android url图像,android,react-native,Android,React Native,使用远程uri显示的动态图像未在android emulator中显示。而这在ios中工作得非常好 <Image source={uri: 'https://reactnativecode.com/wp-content/uploads/2017/05/react_thumb_install.png'} style = {{height: 200, resizeMode : 'stretch', margin: 5 }} /> 我们是否需要在android中进行任何额外的配置来显

使用远程uri显示的动态图像未在android emulator中显示。而这在ios中工作得非常好

<Image source={uri: 'https://reactnativecode.com/wp-content/uploads/2017/05/react_thumb_install.png'} style = {{height: 200, resizeMode : 'stretch', margin: 5 }} />

我们是否需要在android中进行任何额外的配置来显示远程图像。请帮忙。

试试这个

<Image   
     onLoad={() => this.forceUpdate()}    
     resizeMode={Image.resizeMode.cover}  
     source={{uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png'}} 
     style = {styles.imageStyle} />

您是否在图像标记中将此uri作为源提供?是的。。。我在image标记中添加了uri作为source,并使用了双括号,比如source={{uri:'image_url'}}
 imageStyle:{
    height:100,
    width:100,    
  }