gpt4 book ai didi

android - Gradle仅在其自己的目录中执行

转载 作者:行者123 更新时间:2023-12-03 05:15:50 25 4
gpt4 key购买 nike

我试图安装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,我需要做些什么吗?

最佳答案

分号后的PATH中有一个多余的空格:

...; C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin
^

我相信是原因。

关于android - Gradle仅在其自己的目录中执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31003989/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com