Migrating existing project - Gradle sync failed
I'm working on migration of existing Android project from IDEA 2016.2.5 to the latest 2016.3.1. Under the old configuration project works fine.
New clean set-up is:
Windows 10 Pro x64
JDK 1.8.0_112 x64 (installed at C:\app\Java\jdk1.8.0_112)
JRE 1.8.0_112 x64 (installed at C:\app\Java\jre)
IntelliJ IDEA 2016.3.1 (installed at C:\app\IntelliJ\2016_3_1)
JAVA_HOME=C:\app\Java\jre
IDEA is installed with JetBrains 64-bit JRE, IDE is launched via idea64.exe. After opening the project I'm getting Gradle sync error:
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:\app\IntelliJ\2016_3_1\jre64,daemonRegistryDir=C:\Users\Boss\.gradle\daemon,pid=5132,idleTimeout=null,daemonOpts=-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=GB,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=d319b05e-f56c-46cf-9662-dad0507888e3,javaHome=C:\app\Java\jre,daemonRegistryDir=C:\Users\Boss\.gradle\daemon,pid=4940,idleTimeout=60000,daemonOpts=-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=GB,-Duser.language=en,-Duser.variant]
Consult IDE log for more details (Help | Show Log)
I cannot understand where does the Gradle get wanted javaHome=C:\app\IntelliJ\2016_3_1\jre64 and how to make it work.
Any suggestions?
Many thanks,
Andriy
Please sign in to leave a comment.
Please see https://youtrack.jetbrains.com/issue/IDEA-162389.
Thank you for response, suggested workaround fixes the issue.