Reputation: 679
I have no error in my project. But the build not successfully load. see the below image. for more details for error. I am using the below command to run the build react-native run-android
but the npm failed to create the build. this image directory exists and I give the correct path for images. Thanks in advance.
-root --assets ---images ---- All Images here.
../../assets/images/sky-img.jpg
use this in code.
Upvotes: 6
Views: 10494
Reputation: 380
Make sure you run the command from the root directory and not from android directory.
android> cd..
project> npx react-native run-android --variant=release
Upvotes: 8
Reputation: 211
Just closing and re-opening the cmd terminal or whatever you are using to run the metro bundler worked for me.
Upvotes: 12
Reputation: 81
Just reset the cache of your Metro Bundler with:
npm start -- --reset-cache
This is happening because the bundler needs to refresh it's existing bundles and the path you previously set.
Upvotes: 8