idea使用總結

一、idea的open默認打開的是java項目,若是是gradle工程須要importjava

二、run/debug Configuration須要選擇main那個選項,編譯輸出路徑須要修改ide

三、在刷新gradle的時候會有以下報錯gradle

現象
idea打開gradle工程時出現以下的錯誤:
Error:The newly created daemon process has a different context than expected.
Java home is different.
Expecting: 'C:\Program Files\Java\jdk1.7.0_40' but was: 'C:\Program Files\Java\jdk1.7.0_40\jre'.
Please configure the JDK to match the expected one.
問題分析
All i understood is gradle is using JRE and IDEA is using JDK and due to that two JAVA_HOME’s are different and giving errors. 
與gradle版本沒有關係

解決方法:
I am using Intellij 15.06, what solved my problem is just go to the directory, JAVA_HOME > jre > lib, and rename the tool.jar to tool.jar.bak, and then try to start a project or import a project again, at last, do not forget to rename it back to tool.jar.
相關文章
相關標籤/搜索