I bundled my latest release:
cd C:\s\ReactNative\MyRNProject\android gradlew :app:bundleRelease
After bundleRelease completed, I validated that the following file existed on my filesystem:
C:\s\ReactNative\MyRNProject\android\app\build\generated\assets\react\release\index.android.bundle
Then I executed the following command to test the release bundle before deployment:
react-native run-android --variant=release
However, this command failed with the following error:
error ENOENT: no such file or directory, open 'C:\s\ReactNative\MyRNProject\android\app\build\generated\assets\react\release\index.android.bundle'
So it appears that some process within the "react-native run-android --variant=release" command deleted the index.android.bundle file generated by bundleRelease and then another subsequent process within the "react-native run-android --variant=release" command failed because index.android.bundle no longer existed. Any idea what the root cause of this error might be or how to avoid?