React Native error Unable to extract native debug metadata

Solution 1:

I managed to find the cause of this issue. I opened my project using android studio (just open the android folder only) and tried running it from there and the emulator was showing

Unable to load script. Make sure you’re either running a Metor service (run ‘react-native start’) or that your bundle ‘index.android.bundle’ is packaged correctly for release.

P/S: The error above didn't show up when I do npx react-native run-android.

Found this very helpful article React Native: Unable to load script: index. android.bundle

What I did was, in the app/build.gradle there is this line project.ext.react and added bundleInRelease: true since I want to generate a released APK. And simply run gradlew assembleRelease from the android folder.