我下载了带有捆绑jre的Idea EAP 2017.3 Ultimate for Mac OS。
一旦我克隆了我的gradle项目,我试图同步,但它抱怨没有项目SDK。
我试图在/Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home
下添加捆绑的jre,但它总是抱怨它不是一个有效的JDK主页。
所以我下载了jre 9并安装了。
添加为Project SDK,现在我得到了这个:
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=/Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home,daemonRegistryDir=/Users/loredanasoetta/.gradle/daemon,pid=421,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=d56a6606-9df7-4dbb-b269-96531b5ba6f9,javaHome=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home,daemonRegistryDir=/Users/loredanasoetta/.gradle/daemon,pid=481,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=en,-Duser.variant]
1)为什么捆绑的jre不被接受?
2)我看到有些人通过在gradle-wrapper.properties
中明确声明jdk路径来解决
org.gradle.java.home=/Library...
但这是垃圾,因为它被推到了回购物上,它只对我有效
哪个是在Mac OS上拥有Idea的正确方法?