1

就像pik它提供了在命令提示符下动态切换 ruby​​ 版本的工具一样,是否有任何工具可以为 gradle 提供相同类型的行为,以便我可以根据需要切换到我正在使用的 gradle 版本。

我用谷歌搜索了它,但找不到合适的解决方案。所以在这里发帖。

使用 sdkman windows 版本时出现以下错误:

PS C:\Users\user> Import-Module posh-gvm
This command is not available in offline mode.
At C:\Users\user\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:294 char:14
+         throw <<<<  'This command is not available in offline mode.'
    + CategoryInfo          : OperationStopped: (This command is...n offline mode.:String) [], RuntimeException
    + FullyQualifiedErrorId : This command is not available in offline mode.

Import-Module : The specified module 'posh-gvm' was not loaded because no valid module file was found in any module dir
ectory.
At line:1 char:14
+ Import-Module <<<<  posh-gvm
    + CategoryInfo          : ResourceUnavailable: (posh-gvm:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
4

1 回答 1

2

是的,有这样的工具。它被称为sdkman。您可以轻松地在 gradle、groovy 和其他可用框架、语言的版本之间切换。

于 2016-02-10T08:46:46.100 回答