所以我在我的 RN 项目中有这个:
<Image style={{padding: 0, height: 100, marginBottom: 40}} resizeMode='contain' source={require ('../assets/logo.png')} />
这个确切的代码昨天工作了。再次运行反应本机运行ios,没有图像。
有什么想法吗?
简单的解决方案:
npm start -- --reset-cache