Why does changing directory prevent me from running gradle?

  Kiến thức lập trình

I have the following issue:

ivan@LAPTOP-JSSQ9B0M:~$ ls
ivan@LAPTOP-JSSQ9B0M:~$ gradle

> Task :help

Welcome to Gradle 4.4.1.

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 in 0s
1 actionable task: 1 executed
ivan@LAPTOP-JSSQ9B0M:~$ cd ..
ivan@LAPTOP-JSSQ9B0M:/home$ ls
ivan
ivan@LAPTOP-JSSQ9B0M:/home$ gradle

FAILURE: Build failed with an exception.

* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
ivan@LAPTOP-JSSQ9B0M:/home$

I was trying to run gradle to check out the current version. I successfully did it. Then i tried to change directory: i stepped one directory back and run gradle again. But for some reason i got some exception.

Why does gradle work in the first directory and not in the second one?

LEAVE A COMMENT