For me the issue was a lot. I was using react-native-video then at some point installed react-native-track-player. These packages were supposed to run together on the app. And so it was working fine until I ran into an issue and I needed to clear my build folder.
After clearing it, my app refused to open but was installing.
What I did to fix the issue:
- Clear my node_modules and reinstalled (This did not fix the issue)
- Then I uninstalled react-native-track-player and started using react-native-sound-player.
- Reinstalled react-native-video and followed the installation guide from here
- Cleared my build again and performed all necessary npm installs
In my case, I found that using react-native-video and react-native-track-player together was the major source of my problem and I think it's related to both packages using different versions of exoplayer. So I would say you uninstall one of them or find a way to work around the exoplayer versions.
Just incase, I was using react-native-video version 5.2.1 and react-native-track-player version 3.2.0