react- native - image :如何使用expo解决react native for android的镜像组件不能在android上工作的问题?我试着用下面的代码:
<Image
source={{
uri: require("../../assets/images/TLC_Icon.png")
}}
style={{
minHeight: 100,
height: 100,
width: 100,
margin: 5
}}
/>这段代码在网站上运行得很好,但不知何故在我的android手机上就不起作用了。
发布于 2020-01-11 11:53:47
看起来你使用本地文件作为图片的来源,而不是互联网图片,所以你不需要uri。
<Image
source={require("../../assets/images/TLC_Icon.png")}
style={{
minHeight: 100,
height: 100,
width: 100,
margin: 5
}}
/>https://stackoverflow.com/questions/59691236
复制相似问题