This project reproduces index.android.bundle missing issue reported in react/react-native#29398
This project is generated with create-react-native-app and updated Gradle version to 6.5 and com.android.tools.build:gradle plugin to 4.1
To reproduce the issue, run the command below
$ cd android
$ ./gradlew clean :app:assembleRelease // or ./gradlew clean :app:releaseBundle
app-release.apk will be generated but it does not have index.android.bundle build
I added the fix in react/react-native#30177 . Running the command below will apply the patch to react.gradle and you can see the issue is resolved
$ yarn add_patch
$ cd android
$ ./gradlew clean :app:assembleRelease // or ./gradlew clean :app:releaseBundle
(The script is tested on Mac. If the copying does not work on Linux, try directly copying the react-patch.gradle to node_modules/react-native/react.gradle)