Some problems were found with the configuration of task ':wrapper'

Hi, I’m new to Gradle. I downloaded, unzipped to desktop, double clicked on the Windows batch file, added GRADLE_HOME to Path, navigated to the bin directory using the command line, typed gradle -v and the following information was returned:

Gradle 2.3

Build time: 2015-02-16 05:09:33 UTC
Build number: none
Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274

Groovy: 2.3.9
Ant: Apache Ant™ version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_45 (Oracle Corporation 25.45-b02)
OS: Windows 7 6.1 amd64


I then ran the following command
$ gradle init --type basic

I got a failure message with the following detail:

  • What went wrong:
    Some problems were found with the configuration of task ‘:wrapper’.

Cannot write to file
‘C:\Users\Nicolette\Desktop\gradle-2.3\bin\gradle\wrapper\gradle-wrapper.jar’
specified for property ‘jarFile’, as ancestor
‘C:\Users\Nicolette\Desktop\gradle-2.3\bin\gradle’ is not a directory.
Cannot write to file ‘C:\Users\Nicolette\Desktop\gradle-2.3\bin\gradle\wrapper\gradle-wrapper.properties’
specified for property ‘propertiesFile’, as ancestor
‘C:\Users\Nicolette\Desktop\gradle-2.3\bin\gradle’ is not a directory.

When I look at the directory structure the following exists:
C:\Users\Nicolette\Desktop\gradle-2.3\bin.gradle i.e. dot-gradle

Would be grateful for guidance on where I went wrong. I have a stack trace if it helps.

What exactly did you set as your GRADLE_HOME?

C:\Users\Nicolette\Desktop\gradle-2.3\bin

Remove the “\bin” and try again. It has to point to the distribution, not the bin directory.

Thanks. I tried that just now but got the same error.

I tried variable GRADLE_HOME C:\Users\Nicolette\Desktop\gradle-2.3 with GRADLE_HOME; in the Path variable. Then tried with GRADLE_HOME/bin in the Path variable.Same error.

I was following instructions here: http://gradle.org/docs/current/userguide/installation.html#N10125 “For running Gradle, add GRADLE_HOME/bin to your PATH environment variable. Usually, this is sufficient to run Gradle.”

And assuming you’re changing these variables in Control Panel, are you starting a new shell after make the change?

Are you running “gradle wrapper” in a project directory, or are you trying to run this while sitting in the GRADLE_HOME directory?