react-native code-push is not showing images from assets in the app

888 Views Asked by At

I am using react native , and using code-push . problem i am getting is- images from assets are not appearing in the app after code-push. please help me out . is there any command i am missing while creating build or what?

I am using below command to create build

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

I am render an image from assets like this

<Image
    style={{width:50, height: 50}}
    source={require('src/assets/images/GrayTime-Science.jpg')}
  />

you can notice --assets-dest android/app/src/dev/res/ is asset destination in build command and i am rendering image src/assets/images/GrayTime-Science.jpg this way . is this the problem ?

1

There are 1 best solutions below

0
On

react-native bundle --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.jsbundle --platform android --dev false code-push release MathFacts ./android/app/src/main/assets/index.android.jsbundle 1.0.4