React-native: Images not showing in android device; but shows perfectly in emulator

The problem was with my bundle packaging command. As @luwu said in his comment, I checked this, and surprised that there is no difference with mine. Then only I noticed a message while running the command

“Assets destination folder is not set, skipping…”

That message was bit confusing since bundle was already created in the assets folder. The ‘Assets’ in that messages actually indicates my images. And I solved the issues with the following command:

react-native bundle --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --dev false --reset-cache --assets-dest android/app/src/main/res/

Leave a Comment