【发布时间】:2026-02-13 15:50:01
【问题描述】:
应用程序在每次开始时使用RNFSL|在 index.android.js 附近的'./res/' 文件夹中下载图像:
var LOGOPATH = RNFS.DocumentDirectoryPath+'/res/';
RNFS.downloadFile({
fromUrl: HOST+'logos/'+i.logo,
toFile : LOGOPATH+i.logo
}).catch(function(e){console.log(e)})
然后我尝试使用以下代码加载此图像:
<View style={styles.ConferenceVerticalItemImageWrap}>
<Image style={[styles.ConferenceVerticalItemImage,{height: height*264/1920, width: height*264/1920}]} resizeMode='contain' source={{uri:LOGOPATH+this.props.logo}}/>
</View>
图像下载正确,文件夹包含图像,但它们没有出现在屏幕上。
【问题讨论】:
-
您能否发布更多代码或向我们提供更多关于正在发生的事情的详细信息?这些稀疏的细节很难诊断和发出这样的问题