I was also facing the same problem. My react-native version was 0.75.13. I upgraded it to react-native version 0.77.0 and resolved my issue.
Steps:
- go to https://react-native-community.github.io/upgrade-helper/
Please make the changes that are mentioned.
- restart the pc
- go to C:\Users\User_Name.gradle
- delete caches and wrapper folder
- delete node_module and package-log.json
- do npm i
- delete debug build
- run npx react-native run-android
and my problem was solved