I managed to fix the issue. I’m using React Native version 0.73, and the problem was related to auto-linking not working properly.
What I did was run:
npx react-native config
This gave me the auto-linking configuration as JSON. I copied that output and pasted it into this path:
android/build/generated/autolinking/autolinking.json After that, I ran the app again with npx react-native run-android, and it worked perfectly!
Just make sure any native modules you're using (like react-native-config) are installed correctly and that your .env file is properly set up.