当我尝试在android studio中构建项目时出现此错误:
无法运行程序“C:\ Program Files \ Java \ jdk1.8.0_05 \ bin \ java”(在 目录“C:\ Users \ magic.AndroidStudioBeta \ system \ compile-server”): CreateProcess error = 2,系统找不到指定的文件
我检查过JAVA_HOME是否正常工作。值得一提的是它实际上位于C:\Program Files\Java\jdk1.7.0_67
我也在我的驱动器周围搜索,看看我在/.androidStudioBeta/systemLog/.idea.log
java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8.0_05\bin\java" (in directory "C:\Users\magic\.AndroidStudioBeta\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:261)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:248)
at com.intellij.compiler.server.BuildManager.launchBuildProcess(BuildManager.java:953)
at com.intellij.compiler.server.BuildManager.access$1900(BuildManager.java:121)
at com.intellij.compiler.server.BuildManager$11$2.run(BuildManager.java:666)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
答案 0 :(得分:2)
试试这个解决方案
点击文件 - >其他设置 - >默认项目结构 - > SDK位置 - >更改那里的JDK位置