Gradle没有建设

时间:2018-01-31 07:17:07

标签: android-studio gradle windows-10

发生以下错误,我的android项目都没有与gradle同步。当我打开android studio时,这种情况自发发生。我的JAVA_HOME用户变量设置为'C:\ Program Files \ Java \ jdk1.8.0_144 \ bin'。此外,android studio中的JDK位置不会从F:\ Softwares \ Android \ jre更改为任何内容,因为当我尝试更改它时它会更改。

The newly created daemon process has a different context than expected. 
Java home is differnt.
Expecting: 'F:\Softwares\Android\jre' but was: 'C:\Program
Files\JAVA\jdk1.8.0_144'. Please configure the JDK to match the expected one.

1 个答案:

答案 0 :(得分:0)

I changed the sdk and ndk location to somewhere else, so that the warnings for space in paths donot occur. Then I could change the JDK location inside android studio to 'C:\ProgramFiles\JAVA\jdk1.8.0_144'. This fixed the gradle problem.