How to fix gradle in Intellij IDEA

When starting a project in Intellij IDEA if you see an error around the lines of 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 Read more…