繁体   English   中英

Web 图像不显示 React-Native

[英]Web Image not displaying React-Native

我正在尝试将链接粘贴到 React Native 的文本框 (TextInput) 中,但它没有显示链接中的图像。 我不确定我的错误在哪里。 请有人帮助我,我真的很感激。 先感谢您!!!!!!!!!

这是代码

const tryImage = "https://images.app.goo.gl/heFUyytHySGiSMeY8"
<View style={styles.info}>
    <Image source={one} style={styles.progress}/>
    <Text style={styles.title}>Add Photo</Text>
    <Image source={{uri: tryImage}} style={styles.icon}/>
</View>

icon:{
    width: 180,
    height: 180,
    marginTop: 50,
},

抱歉耽搁了。 可能你的链接有问题。 所以你需要传递正确的uri。 例如,现在您的链接没有任何扩展名,例如 png 或 jpg。 所以请尝试使用png。 例如:source={{uri:tryImage+'png'}} 希望我的回答对你有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM