A problem for which I looked for solutions on the net but despite everything the problem resisted. So finally here is how I solved. I hope this can help someone in the future
Instead of gradlew clean
, You just have to do it like this: ./gradlew clean
cd android
./gradlew clean
cd ..
npx react-native run-android