Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30338

Images not appearing when running from APK

$
0
0

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 assembleRelease

I can see that the first step bundles our images into the following directory

android/app/src/main/res/drawable-mdpi

Opening the built apk I can see that the images are referenced in the MANIFEST.MF file

apk/release/app-release/META-INF/services

like so

Name: res/drawable-mdpi-v4/app_assets_images_01.pngName: res/drawable-mdpi-v4/app_assets_images_02.png

and 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


Viewing all articles
Browse latest Browse all 30338

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>