我正在尝试安装Gradle,但它似乎不能在自己的bin目录之外工作。
我编辑了PATH和gradle_home,因此它们都在必需的文件夹中。
C:\Users\shenj>gradle
'gradle' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\shenj>cd Downloads\gradle-2.4-all\gradle-2.4\bin
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin>gradle
:help
Welcome to Gradle 2.4.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
To see more detail about a task, run gradle help --task <task>
BUILD SUCCESSFUL
Total time: 2.759 secs
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin>cd ..
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4>gradle
'gradle' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4>echo %gradle_home%
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4>echo %PATH%
C:\Program Files (x86)\BlueCoat\ProxyClient\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files (x86)\Blue Coat\ProxyClient\; C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin
为了在我的项目文件夹中构建gradle,我还需要做些什么吗?
答案 0 :(得分:1)
分号后面的PATH
中有一个额外的空格:
...; C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin
^
我相信这是原因。