我已经尝试了this的所有建议,包括将gradle.properties JAVA_HOME设置为实际路径......但不适用于我。请帮忙。
一些细节: 系统:windows 32bit
环境变量路径:C:\ Program Files \ Java \ jre1.8.0_121 \ bin; C:\ Program Files \ Java \ jre6 \ bin; C:\ ProgramData \ Oracle \ Java \ javapath; C:\ Program Files \ PC连接解决方案\; C:\ Windows \ system32; C:\ Windows; C:\ Windows \ System32 \ Wbem; C:\ Windows \ System32 \ WindowsPowerShell \ v1.0 \; c:\ Program Files \ Microsoft SQL Server \ 100 \ Tools \ Binn \; c:\ Program Files \ Microsoft SQL Server \ 100 \ DTS \ Binn \; C:\ Program Files \ HI-TECH Software \ PICC \ lite \ 9.60 \ bin; C:\ Program Files \ OpenVPN的\ BIN; d:\软件\ BIN
IDE:Android Studio 3.0
JDK,JRE版本(C:\ program files \ java ...中的版本):分别为jdk1.8.0_111,jre1.8.0_121
完整错误消息:Gradle sync失败:新创建的守护进程具有与预期不同的上下文。无法重新连接到此守护程序。上下文不匹配:Java home不同。 通缉:DefaultDaemonContext [uid = null,javaHome = D:\ Android sudio \ android-studio \ jre,daemonRegistryDir = C:\ Users \ User.gradle \ daemon,pid = 6568,idleTimeout = null,daemonOpts = -Xmx1024m,-Dfile .encoding =窗口1252,-Duser.country = US,-Duser.language = EN,-Duser.variant] 实际:DefaultDaemonContext [uid = cb87848b-f0d9-4feb-abfb-b6562a0e6618,javaHome = C:\ Program Files \ Java \ jre1.8.0_121,daemonRegistryDir = C:\ Users \ User.gradle \ daemon,pid = 5448,idleTimeout = 10800000,daemonOpts = -Xmx1024m,-Dfile.encoding =窗口1252,-Duser.country = US,-Duser.language = EN,-Duser.variant]