enter image description here

Getting this error while building up the react native project 'gradlew.bat' is not recognized as an internal or external command, operable program or batch file. error Failed to install the app. Command failed with exit code 1: gradlew.bat tasks 'gradlew.bat' is not recognized as an internal or external command, operable program or batch file.

This Project is working fine for me in Mac Machine not working in Windows Machine

1

There are 1 best solutions below

3
On

The Terminal that is integrated into Android Studio is a PowerShell terminal. You can see that by the PS at the beginning of the line.

In PowerShell commands work a bit different that the old cmd.exe command line shell. For programs not in PATH, like gradlew.bat that is located in your current directory, you have to specify the path when executing it.

Therefore eyon have to execute

.\gradlew.bat

Alternatively a forward slash also works:

./gradlew.bat

For shorten the command you can omit the .bat ending.