This issue relates to Android.
We have recently migrated our react-native project from Expo to bare workflow. We have an issue however whereby images are not loading when running the built apk file.
When debugging on an emulator or device using react-native android everything works fine. However on a built apk images simply do not appear.
Our build is being conducted as follows
react-native bundle --platform android / --dev false / --entry-file index.js --bundle-output android/app/src/main/assets/app.bundle --assets-dest android/app/src/main/resandroid/gradlew -p android cleanandroid/gradlew -p android assembleReleaseI can see that the first step bundles our images into the following directory
android/app/src/main/res/drawable-mdpiOpening the built apk I can see that the images are referenced in the MANIFEST.MF file
apk/release/app-release/META-INF/serviceslike so
Name: res/drawable-mdpi-v4/app_assets_images_01.pngName: res/drawable-mdpi-v4/app_assets_images_02.pngand that the images do exist in the apk on that path.
So I am utterly confused as to why they do not display when running the apk on a device.
This is not an uncommon issue and there are several other Stack Overflow issues along this vein, however I have gone through all of them and none of the suggested solutions work for us.
Gradle version=5.6.3
RN version=61.5