spawnSync ./gradlew EACCES error when running react native project on emulator udara

I fixed this problem with:

chmod 755 android/gradlew 

the chmod command sets the permissions of files or directories. https://www.computerhope.com/unix/uchmod.htm


I think it's permission issue I faced this problem before, you can resolve it by changing the permission, run the following command

chmod 755 android/gradlew

I tried the above solution.but in my case I had to use sudo because of the permission issue. You can resolve it by running the command

sudo chmod 755 android/gradlew