EDIT:
The solution prompted by @Percy Vega on this post worked for me.
Running idea64.exe instead of idea.exe when you have a 64 bit JRE seems to do the trick.
I've never used Gradle, so I'm pretty confused right now: I've been trying for a while now to get this to work, but without any success. I'm trying to create an Android project in IntelliJ Idea 2016.3.2, but as soon as I create it, I get this message:
On the message log:
Gradle sync started
Gradle sync failed: The newly created daemon process has a different context than expected.
It won't be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3.1\jre,daemonRegistryDir=C:\Users\xico\.gradle\daemon,pid=5660,idleTimeout=null,daemonOpts=-Xmx1536m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=08e53ecc-a9ee-405c-afc9-a7ba8779d6ee,javaHome=C:\Program Files\Java\jdk1.8.0_112,daemonRegistryDir=C:\Users\xico\.gradle\daemon,pid=2336,idleTimeout=60000,daemonOpts=-Xmx1536m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Consult IDE log for more details (Help | Show Log)
I've downloaded Gradle 3.3 and stored it at:
C:\Program Files\Gradle\gradle-3.3
Here are the Gradle setting, inside of IntelliJ. Iv'e also tried to check 'Offline Work', but it gives the same result:
The project root's build.gradle file:
And the app´s build.gradle file:
How can I manage to fix this? Thanks in advance.
PS: If any more information would be useful please just ask.
One specifies the version of Gradle inside a gradle-wrapper.properties
file, whose contents look like this:
#Thu Oct 06 00:21:08 IDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
Assuming your project structure is:
my-project
|- app
|+ libs
|+ src
|- gradle
|- wrapper
|- gradle-wrapper.properties << here
Then, AS downloads it and typically installs it (on a Windows machine) to:
C:\Users\<username>\.gradle\wrapper\dists\gradle-<version>-all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With