'gradle' is not recognized internal or external command

I had downloaded Gradle 2.1 from http://www.gradle.org/ and unpacked it in folder C:\Gradle\gradle-2.1-all

I am using Windows 7 (32 Bit OS) in DELL Vostro with Intel i5 Pentium.

I set GRADLE_HOME as C:\Gradle\gradle-2.1-all and add to PATH = %GRADLE_HOME%\bin

Command Summary is:

Microsoft Windows [Version 6.1.7601] Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\Dell>gradle ‘gradle’ is not recognized as an internal or external command, operable program or batch file.

C:\Users\Dell>cd…

C:\Users>cd…

C:>cd gradle

C:\Gradle>cd gradle-2.1-all

C:\Gradle\gradle-2.1-all>gradle -v ‘gradle’ is not recognized as an internal or external command, operable program or batch file.

C:\Gradle\gradle-2.1-all>cd bin The system cannot find the path specified.

C:\Gradle\gradle-2.1-all>gradle -v ‘gradle’ is not recognized as an internal or external command, operable program or batch file.

C:\Gradle\gradle-2.1-all>echo path path

C:\Gradle\gradle-2.1-all>echo %GRADLE_HOME% C:\Gradle\gradle-2.1-all

C:\Gradle\gradle-2.1-all>echo PATH PATH

C:\Gradle\gradle-2.1-all>echo %PATH% C:\Python\Python34;C:\Python\Python34\Scripts;C:\ProgramData\Oracle\Java\javapa th;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\W indowsPowerShell\v1.0;C:\ant194\bin;C:\maven323\bin;C:\Java\jdk_8u20\bin;C:\Jav a\groovy-binary-2.4.0-beta-3\groovy-2.4.0-beta-3\bin;C:\Python\Python34;;C:\Lua\ 5.1;C:\Lua\5.1\clibs;C:\Gradle\gradle-2.1-all\bin;C:\Ruby200\bin

C:\Gradle\gradle-2.1-all>gradle ‘gradle’ is not recognized as an internal or external command, operable program or batch file.

C:\Gradle\gradle-2.1-all>

Please help us in installing Gradle.

Regards Rohan Sarker +913324288069 / +917278539338 www.rohansarker.com

Hi Rohan

This tells me that the extraction of the zip didn’t work out.  Or didnt go where you think…

C:\Gradle\gradle-2.1-all>cd bin 
The system cannot find the path specified. 
So even though you’ve correctly added %GRADLE_HOME%\bin to the path, there is no bin directory in that folder to speak of. 

Can you do an dir  in that directory, and worth double checking that the zip target put it in the right place. 

Kind regards

Kon

Look carefully at the part where you do ‘cd bin’ to see the error message there. My guess is that you did not unpacked it correctly (or to the right place).

Please let me tell you that bin folder exists in the path:

C:\Gradle\gradle-2.1-all\gradle-2.1\bin

There are two files in the bin Folder:

gradle File gradle Windows Batch File

Command Windows is:

Microsoft Windows [Version 6.1.7601] Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\Dell>cd…

C:\Users>cd…

C:>cd Gradle

C:\Gradle>cd gradle-2.1-all

C:\Gradle\gradle-2.1-all>cd gradle-2.1

C:\Gradle\gradle-2.1-all\gradle-2.1>cd bin

C:\Gradle\gradle-2.1-all\gradle-2.1\bin>

Regards

Rohan Sarker

+913324288069 / +917278539338

www.rohansarker.com

Gradle Installation successful.

Command Window is:

Microsoft Windows [Version 6.1.7601] Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\Dell>cd…

C:\Users>cd…

C:>cd Gradle

C:\Gradle>cd gradle-2.1-all

C:\Gradle\gradle-2.1-all>cd gradle-2.1

C:\Gradle\gradle-2.1-all\gradle-2.1>cd bin

C:\Gradle\gradle-2.1-all\gradle-2.1\bin>gadl ‘gadl’ is not recognized as an internal or external command, operable program or batch file.

C:\Gradle\gradle-2.1-all\gradle-2.1\bin>gadle ‘gadle’ is not recognized as an internal or external command, operable program or batch file.

C:\Gradle\gradle-2.1-all\gradle-2.1\bin>gradle :help

Welcome to Gradle 2.1.

To run a build, run gradle …

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

BUILD SUCCESSFUL

Total time: 13.898 secs C:\Gradle\gradle-2.1-all\gradle-2.1\bin>gradle -v

------------------------------------------------------------ Gradle 2.1 ------------------------------------------------------------

Build time:

2014-09-08 10:40:39 UTC Build number: none Revision:

e6cf70745ac11fa943e19294d19a2c527a669a53

Groovy:

2.3.6 Ant:

Apache Ant™ version 1.9.3 compiled on December 23 2013 JVM:

1.8.0_20 (Oracle Corporation 25.20-b23) OS:

Windows 7 6.1 x86

C:\Gradle\gradle-2.1-all\gradle-2.1\bin>

Regards

Rohan Sarker

+913324288069 / +917278539338

www.rohansarker.com

Hi Rohan
Did you get this fixed up?

I notice in your reply Gradle was installed to  
C:\Gradle\gradle-2.1-all\gradle-2.1\bin

but in your original message you had your path set as

C:\Gradle\gradle-2.1-all>echo %PATH% 
C:\Python\Python34;C:\Python\Python34\Scripts;C:\ProgramData\Oracle\Java\javapa 
th;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\W 
indowsPowerShell\v1.0;C:\ant194\bin;C:\maven323\bin;C:\Java\jdk_8u20\bin;C:\Jav 
a\groovy-binary-2.4.0-beta-3\groovy-2.4.0-beta-3\bin;C:\Python\Python34;;C:\Lua 
5.1;C:\Lua\5.1\clibs;C:\Gradle\gradle-2.1-all\bin;C:\Ruby200\bin 

Your path has C:\Gradle\gradle-2.1-all\bin should be C:\Gradle\gradle-2.1-all\gradle-2.1\bin

Regards

Kon

Gradle.org site suggests to create environmental variable GRADLE_HOME set to gradle-XXX/ bin. But it works only in bin folder. I just opened environmental variables window from computer properties,

  1. select the $path variable.

  2. Copied the content of value in notepad,

  3. Manually added the gradle-XXX/ bin directory. copy& paste it value box. Now I am all set. No need restart the command prompt. The gradle command works from any directory now.

I got the same problem… Gradle is working form /bin directory:

Gradle 2.2.1 ------------------------------------------------------------

Build time:

2014-11-24 09:45:35 UTC Build number: none Revision:

6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a

Groovy:

2.3.6 Ant:

Apache Ant™ version 1.9.3 compiled on December 23 2013 JVM:

1.8.0_25 (Oracle Corporation 25.25-b02) OS:

Windows 8.1 6.3 amd64

but outside the folder I have got message:

‘gradle’ is not recognized as an internal or external command, operable program or batch file.

my enviromental variable is set: name: GRADLE_HOME value: C:\Program Files\Gradle\gradle-2.2.1\bin

Have U got any idea?

wojder

There is no need to create separate variable for GRADLE_HOME. Open “path” env variable and add “C:\Program Files\Gradle\gradle-2.2.1\bin” at the end. It should work…

wojder

There is no need to create separate variable for GRADLE_HOME. Open “path” env variable and add “C:\Program Files\Gradle\gradle-2.2.1\bin” at the end. It should work…

Thank U for help. Gradle is working from Git bash and windows cmd, but I got strange situation now - gradle is recognizable in /bin folder from Android Studio terminal but outside that folder I got:

‘gradle’ is not recognized as an internal or external command, operable program or batch file.

My shell path in Android Studio terminal: cmd.exe

Whats wrong with it?

  1. Create env variable GRADLE_HOME=C:\Program Files\Gradle\gradle-2.2.1 2. Edit env variable path=$GRADLE_HOME\bin. It should resolve your issues.

I am having the same issue, I did all the settings both for GRADLE_HOME and path, what i discovered is that gradle -v command works well in git bash shell but does not work in windows cmd prompt. Working from bash for now Thanks