When I run
npx react-native run-android --variant=release
in RN 0.61.3 and I receive this error message.
ENOENT: no such file or directory, open 'android/app/src/main/assets/index.android.bundle'
The build works fine when debugging without the release variant.
For some reason I needed to create the assets folder as per below.
android/app/src/main/assets
android/app/src/main/
assets
android/app/src/main/assets
i had the assets folder already, but mistakenly had kept on being in the android folder, doing cd ..
helped me and the run the command npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
Right click the app folder New->Folder->Assests Folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With