本地图像在React-Native应用程序发布版本中不可见

问题描述:

在我的本机应用程序中,我有一个"src" 文件夹,其中包含一个 Images 文件夹和screens文件夹.我的 screens 文件夹具有各种 components ,其中我使用以下代码在 Images 中使用本地图像.

In my react-native app I have "src" folder that includes a Images folder and screens folder.My screens folder have various components where I am uing local images from Images using following code.

<Image source={require('src/Images/logo.png')} />

logo.png 是放置在Images文件夹中的图像,现在有更多这样的图像引用.现在,所有这些图像在开发模式下都能很好地显示,但是当我使用gradlew assemblerelease并将apk安装在我的设备上,以这种方式引用的所有图像都消失在某处.不知道是什么原因,所以请帮助我. 我的本机版本是0.40

logo.png is an image placed in Images folder, there are many more such images referenced like this.Now all these images are shown pretty well in development mode but when I generated the release apk using gradlew assemblereleaseand installed the apk on my device all images referenced in this manner disappear somewhere. Don't know what can be the reasons for that so please help me. my react-native version is 0.40