I have Android Studio and its build tool is Gradle. However, inside the Android Studio Terminal (not the windows cmd..) if i type
gradle tasks
I get
'gradle' is not recognized as an internal or external command,
operable program or batch file.
How is that possible?
If Android Studio is using gradle then isn't gradle installed already?
to add more confusion, when I look at C:\Program Files I don't see a gradle folder at all.
How does Android Studio and Gradle work together?
thanks
To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … e.g. gradlew clean allTests.
'gradlew' is not recognized as an internal or external command, operable program or batch file. so you have to go to android directory by typing cd android command from terminal. then type gradlew followed by other commands you need and the error should be gone.
To check if Gradle is properly installed just type gradle -v. The output shows the Gradle version and also the local environment configuration (groovy and JVM version, etc.). The displayed Gradle version should match the distribution you have downloaded.
On Windows you have to use the gradlew
command (it uses the gradlew.bat in the root project folder).
On Linux and Mac you have to use the gradle
command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With